1 | <?php |
||
19 | class FieldsTable |
||
20 | { |
||
21 | /** @var integer Navigation identifier for table structure */ |
||
22 | protected $navigationID; |
||
23 | |||
24 | /** @var integer Table parent material identifier */ |
||
25 | protected $materialID; |
||
26 | |||
27 | /** @var Field[] Collection field instances that correspond table columns */ |
||
28 | protected $fields; |
||
29 | |||
30 | /** @var QueryInterface Database query interface */ |
||
31 | protected $query; |
||
32 | |||
33 | /** @var string Locale identifier */ |
||
34 | protected $locale; |
||
35 | |||
36 | /** @var array Fields table collection */ |
||
37 | protected $collection; |
||
38 | |||
39 | /** @return array Get field table column names collection */ |
||
40 | public function columns() |
||
44 | |||
45 | /** |
||
46 | * Get collection of table column values as array. |
||
47 | * |
||
48 | * @param string $columnName Additional field name |
||
49 | * @return array Collection of table column values as array |
||
50 | */ |
||
51 | public function values($columnName) |
||
55 | |||
56 | /** |
||
57 | * Get field table as multidimensional array. |
||
58 | * |
||
59 | * @return array Field table represented as array |
||
60 | */ |
||
61 | public function toArray() |
||
65 | |||
66 | /** @return array Collection of table rows(materials) identifiers */ |
||
67 | protected function rowIDs() |
||
78 | |||
79 | /** |
||
80 | * Build correct localized field request for retrieving additional fields records. |
||
81 | * |
||
82 | * @param Field[] $fields Collection of additional fields |
||
83 | * @return Condition Built condition for query |
||
84 | */ |
||
85 | protected function fieldsCondition($fields) |
||
118 | |||
119 | /** |
||
120 | * Fill table with data from database. |
||
121 | */ |
||
122 | protected function load() |
||
148 | |||
149 | /** |
||
150 | * FieldsTable constructor. |
||
151 | * |
||
152 | * @param QueryInterface $query Database query interface |
||
153 | * @param integer $navigationID Navigation identifier for table structure |
||
154 | * @param integer $materialID Table parent material identifier |
||
155 | * @param string $locale Locale identifier |
||
156 | */ |
||
157 | public function __construct(QueryInterface $query, $navigationID, $materialID, $locale = DEFAULT_LOCALE) |
||
166 | } |
||
167 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: