Total Complexity | 3 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
14 | class Child extends Wrappable implements ChildInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $column = ''; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $foreign = ''; |
||
25 | |||
26 | /** |
||
27 | * Initializes the child query instance. |
||
28 | * |
||
29 | * @param \Rougin\Windstorm\QueryInterface $query |
||
30 | * @param string $foreign |
||
31 | * @param string $column |
||
32 | */ |
||
33 | public function __construct(QueryInterface $query, $foreign, $column) |
||
34 | { |
||
35 | parent::__construct($query); |
||
36 | |||
37 | $this->column = $column; |
||
38 | |||
39 | $this->foreign = $foreign; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * Returns the identifier column for identifying children from the parent table. |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | public function column() |
||
48 | { |
||
49 | return $this->column; |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * Returns the identifier column from the child table. |
||
54 | * |
||
55 | * @return string |
||
56 | */ |
||
57 | public function foreign() |
||
60 | } |
||
61 | } |
||
62 |