1 | <?php |
||
18 | class Relational extends Base |
||
19 | { |
||
20 | /** @var string Related entity primary field */ |
||
21 | protected $relationPrimary; |
||
22 | |||
23 | /** @var string Relation entity identifier */ |
||
24 | protected $relationIdentifier; |
||
25 | |||
26 | /** |
||
27 | * Entity constructor. |
||
28 | * @param QueryInterface $query Database query instance |
||
29 | * @param string $identifier Entity identifier |
||
30 | * @param string $relationPrimary Relation entity primary field name |
||
31 | * @param string $relationIdentifier Relation entity identifier |
||
32 | * @param array $filteringIDs Collection of entity identifiers for filtering |
||
33 | */ |
||
34 | public function __construct( |
||
46 | |||
47 | /** |
||
48 | * Get current entity identifiers collection by navigation identifier. |
||
49 | * |
||
50 | * @param string $relationID Relation entity identifier |
||
51 | * @param mixed $relationValue Relation entity value |
||
52 | * @param array $filteringIDs Collection of entity identifiers for filtering query |
||
53 | * @return array Collection of entity identifiers filtered by navigation identifier. |
||
54 | */ |
||
55 | public function idsByRelationID($relationID, $relationValue = null, array $filteringIDs = array()) |
||
71 | |||
72 | /** |
||
73 | * Retrieve entities from database. |
||
74 | * |
||
75 | * @param string|array $relationID Relation entity identifier or collection |
||
76 | * @param mixed $relationValue Relation entity value |
||
77 | * @param string $executor Query execution function name |
||
78 | * @return mixed[] Collection of entity instances for this relation identifier |
||
79 | */ |
||
80 | protected function retrieve($relationID, $relationValue, $executor) |
||
90 | |||
91 | /** |
||
92 | * Get current entity instances collection by navigation identifier. |
||
93 | * |
||
94 | * @param string $relationID Relation entity identifier |
||
95 | * @param mixed $relationValue Relation entity value |
||
96 | * @return mixed[] Collection of entity instances |
||
97 | */ |
||
98 | public function byRelationID($relationID, $relationValue = null) |
||
102 | |||
103 | /** |
||
104 | * Get current entity instances amount by navigation identifier. |
||
105 | * |
||
106 | * @param string $relationID Relation entity identifier |
||
107 | * @param mixed $relationValue Relation entity value |
||
108 | * @return integer Amount of entities related to Navigation identifier |
||
109 | */ |
||
110 | public function amountByRelationID($relationID, $relationValue = null) |
||
114 | } |
||
115 |
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: