| 1 | <?php |
||
| 12 | class Relation { |
||
| 13 | |||
| 14 | /** @var string */ |
||
| 15 | public $name; |
||
| 16 | |||
| 17 | /** @var string */ |
||
| 18 | public $aggregate = 'first'; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Relation constructor. |
||
| 22 | * @param string $columnName |
||
| 23 | * @internal param string $name |
||
| 24 | */ |
||
| 25 | 5 | public function __construct(string $columnName) |
|
| 29 | |||
| 30 | /** |
||
| 31 | * @param string $name |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | 5 | private function _extractAggregate(string $name): string |
|
| 48 | |||
| 49 | /** |
||
| 50 | * @param string $columnName |
||
| 51 | * @param Collection $relation |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | public function getValue(string $columnName, Collection $relation): string |
||
| 64 | } |