Final Class Yiisoft\Data\Db\FieldMapper\ArrayFieldMapper
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Yiisoft\ |
Maps field names using an array-based mapping configuration.
This mapper uses a predefined array to map field names to database column names or expressions. If a field is not found in the mapping, it returns the original field name.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ |
|
| map() | Yiisoft\ |
Method Details
| public mixed __construct ( (\ | ||
| $map | (\ |
The field mapping array where keys are field names and values are column names or expressions. For example:
|
public function __construct(
private readonly array $map,
) {}
User Contributed Notes
Leave a comment
Join the conversation to share a note.