Skip to content
Search
DSL · Pg query

static_factory_mapper

Definition

/**
 * Create a row mapper backed by a public static factory method.
 *
 * The factory method must accept a single array<string, mixed> $row and return
 * an instance of the target class. If your factory needs access to the mapping
 * Context (sql/parameters/client/catalog/user-data), implement RowMapper directly.
 *
 * @template T of object
 *
 * @param class-string<T> $class
 * @param non-empty-string $method
 *
 * @return StaticFactoryMapper<T>
 */
static_factory_mapper(string $class, string $method) : StaticFactoryMapper

Contributors

Built in the open.

Join us on GitHub
scroll back to top