1 | <?php |
||
20 | class Laravel |
||
21 | extends \Aimeos\MShop\Customer\Manager\Standard |
||
22 | { |
||
23 | private $searchConfig = array( |
||
24 | 'customer.id' => array( |
||
25 | 'label' => 'Customer ID', |
||
26 | 'code' => 'customer.id', |
||
27 | 'internalcode' => 'lvu."id"', |
||
28 | 'type' => 'integer', |
||
29 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT, |
||
30 | 'public' => false, |
||
31 | ), |
||
32 | 'customer.siteid' => array( |
||
33 | 'code' =>'customer.siteid', |
||
34 | 'internalcode' =>'lvu."siteid"', |
||
35 | 'label' =>'Customer site ID', |
||
36 | 'type' => 'string', |
||
37 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
38 | 'public' => false, |
||
39 | ), |
||
40 | 'customer.code' => array( |
||
41 | 'label' => 'Customer username', |
||
42 | 'code' => 'customer.code', |
||
43 | 'internalcode' => 'lvu."email"', |
||
44 | 'type' => 'string', |
||
45 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR |
||
46 | ), |
||
47 | 'customer.label' => array( |
||
48 | 'label' => 'Customer label', |
||
49 | 'code' => 'customer.label', |
||
50 | 'internalcode' => 'lvu."name"', |
||
51 | 'type' => 'string', |
||
52 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR |
||
53 | ), |
||
54 | 'customer.salutation' => array( |
||
55 | 'label' => 'Customer salutation', |
||
56 | 'code' => 'customer.salutation', |
||
57 | 'internalcode' => 'lvu."salutation"', |
||
58 | 'type' => 'string', |
||
59 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
60 | ), |
||
61 | 'customer.company' => array( |
||
62 | 'label' => 'Customer company', |
||
63 | 'code' => 'customer.company', |
||
64 | 'internalcode' => 'lvu."company"', |
||
65 | 'type' => 'string', |
||
66 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
67 | ), |
||
68 | 'customer.vatid' => array( |
||
69 | 'label' => 'Customer VAT ID', |
||
70 | 'code' => 'customer.vatid', |
||
71 | 'internalcode' => 'lvu."vatid"', |
||
72 | 'type' => 'string', |
||
73 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
74 | ), |
||
75 | 'customer.title' => array( |
||
76 | 'label' => 'Customer title', |
||
77 | 'code' => 'customer.title', |
||
78 | 'internalcode' => 'lvu."title"', |
||
79 | 'type' => 'string', |
||
80 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
81 | ), |
||
82 | 'customer.firstname' => array( |
||
83 | 'label' => 'Customer firstname', |
||
84 | 'code' => 'customer.firstname', |
||
85 | 'internalcode' => 'lvu."firstname"', |
||
86 | 'type' => 'string', |
||
87 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
88 | ), |
||
89 | 'customer.lastname' => array( |
||
90 | 'label' => 'Customer lastname', |
||
91 | 'code' => 'customer.lastname', |
||
92 | 'internalcode' => 'lvu."lastname"', |
||
93 | 'type' => 'string', |
||
94 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
95 | ), |
||
96 | 'customer.address1' => array( |
||
97 | 'label' => 'Customer address part one', |
||
98 | 'code' => 'customer.address1', |
||
99 | 'internalcode' => 'lvu."address1"', |
||
100 | 'type' => 'string', |
||
101 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
102 | ), |
||
103 | 'customer.address2' => array( |
||
104 | 'label' => 'Customer address part two', |
||
105 | 'code' => 'customer.address2', |
||
106 | 'internalcode' => 'lvu."address2"', |
||
107 | 'type' => 'string', |
||
108 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
109 | ), |
||
110 | 'customer.address3' => array( |
||
111 | 'label' => 'Customer address part three', |
||
112 | 'code' => 'customer.address3', |
||
113 | 'internalcode' => 'lvu."address3"', |
||
114 | 'type' => 'string', |
||
115 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
116 | ), |
||
117 | 'customer.postal' => array( |
||
118 | 'label' => 'Customer postal', |
||
119 | 'code' => 'customer.postal', |
||
120 | 'internalcode' => 'lvu."postal"', |
||
121 | 'type' => 'string', |
||
122 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
123 | ), |
||
124 | 'customer.city' => array( |
||
125 | 'label' => 'Customer city', |
||
126 | 'code' => 'customer.city', |
||
127 | 'internalcode' => 'lvu."city"', |
||
128 | 'type' => 'string', |
||
129 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
130 | ), |
||
131 | 'customer.state' => array( |
||
132 | 'label' => 'Customer state', |
||
133 | 'code' => 'customer.state', |
||
134 | 'internalcode' => 'lvu."state"', |
||
135 | 'type' => 'string', |
||
136 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
137 | ), |
||
138 | 'customer.languageid' => array( |
||
139 | 'label' => 'Customer language', |
||
140 | 'code' => 'customer.languageid', |
||
141 | 'internalcode' => 'lvu."langid"', |
||
142 | 'type' => 'string', |
||
143 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
144 | ), |
||
145 | 'customer.countryid' => array( |
||
146 | 'label' => 'Customer country', |
||
147 | 'code' => 'customer.countryid', |
||
148 | 'internalcode' => 'lvu."countryid"', |
||
149 | 'type' => 'string', |
||
150 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
151 | ), |
||
152 | 'customer.telephone' => array( |
||
153 | 'label' => 'Customer telephone', |
||
154 | 'code' => 'customer.telephone', |
||
155 | 'internalcode' => 'lvu."telephone"', |
||
156 | 'type' => 'string', |
||
157 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
158 | ), |
||
159 | 'customer.email' => array( |
||
160 | 'label' => 'Customer email', |
||
161 | 'code' => 'customer.email', |
||
162 | 'internalcode' => 'lvu."email"', |
||
163 | 'type' => 'string', |
||
164 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
165 | ), |
||
166 | 'customer.telefax' => array( |
||
167 | 'label' => 'Customer telefax', |
||
168 | 'code' => 'customer.telefax', |
||
169 | 'internalcode' => 'lvu."telefax"', |
||
170 | 'type' => 'string', |
||
171 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
172 | ), |
||
173 | 'customer.website' => array( |
||
174 | 'label' => 'Customer website', |
||
175 | 'code' => 'customer.website', |
||
176 | 'internalcode' => 'lvu."website"', |
||
177 | 'type' => 'string', |
||
178 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
179 | ), |
||
180 | 'customer.longitude' => array( |
||
181 | 'label' => 'Customer longitude', |
||
182 | 'code' => 'customer.longitude', |
||
183 | 'internalcode' => 'lvu."longitude"', |
||
184 | 'type' => 'float', |
||
185 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_FLOAT, |
||
186 | ), |
||
187 | 'customer.latitude' => array( |
||
188 | 'label' => 'Customer latitude', |
||
189 | 'code' => 'customer.latitude', |
||
190 | 'internalcode' => 'lvu."latitude"', |
||
191 | 'type' => 'float', |
||
192 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_FLOAT, |
||
193 | ), |
||
194 | 'customer.birthday' => array( |
||
195 | 'label' => 'Customer birthday', |
||
196 | 'code' => 'customer.birthday', |
||
197 | 'internalcode' => 'lvu."birthday"', |
||
198 | 'type' => 'string', |
||
199 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
200 | ), |
||
201 | 'customer.password' => array( |
||
202 | 'label' => 'Customer password', |
||
203 | 'code' => 'customer.password', |
||
204 | 'internalcode' => 'lvu."password"', |
||
205 | 'type' => 'string', |
||
206 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
207 | ), |
||
208 | 'customer.status' => array( |
||
209 | 'label' => 'Customer status', |
||
210 | 'code' => 'customer.status', |
||
211 | 'internalcode' => 'lvu."status"', |
||
212 | 'type' => 'integer', |
||
213 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT |
||
214 | ), |
||
215 | 'customer.dateverified' => array( |
||
216 | 'label' => 'Customer verification date', |
||
217 | 'code' => 'customer.dateverified', |
||
218 | 'internalcode' => 'lvu."email_verified_at"', |
||
219 | 'type' => 'date', |
||
220 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
221 | ), |
||
222 | 'customer.ctime' => array( |
||
223 | 'label' => 'Customer creation time', |
||
224 | 'code' => 'customer.ctime', |
||
225 | 'internalcode' => 'lvu."created_at"', |
||
226 | 'type' => 'datetime', |
||
227 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
228 | ), |
||
229 | 'customer.mtime' => array( |
||
230 | 'label' => 'Customer modification time', |
||
231 | 'code' => 'customer.mtime', |
||
232 | 'internalcode' => 'lvu."updated_at"', |
||
233 | 'type' => 'datetime', |
||
234 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
235 | ), |
||
236 | 'customer.editor' => array( |
||
237 | 'label' =>'Customer editor', |
||
238 | 'code' =>'customer.editor', |
||
239 | 'internalcode' => 'lvu."editor"', |
||
240 | 'type' => 'string', |
||
241 | 'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR, |
||
242 | ), |
||
243 | 'customer:has' => array( |
||
244 | 'code' => 'customer:has()', |
||
245 | 'internalcode' => ':site AND :key AND lvuli."id"', |
||
246 | 'internaldeps' => ['LEFT JOIN "users_list" AS lvuli ON ( lvuli."parentid" = lvu."id" )'], |
||
247 | 'label' => 'Customer has list item, parameter(<domain>[,<list type>[,<reference ID>)]]', |
||
248 | 'type' => 'null', |
||
249 | 'internaltype' => 'null', |
||
250 | 'public' => false, |
||
251 | ), |
||
252 | 'customer:prop' => array( |
||
253 | 'code' => 'customer:prop()', |
||
254 | 'internalcode' => ':site AND :key AND lvupr."id"', |
||
255 | 'internaldeps' => ['LEFT JOIN "users_property" AS lvupr ON ( lvupr."parentid" = lvu."id" )'], |
||
256 | 'label' => 'Customer has property item, parameter(<property type>[,<language code>[,<property value>]])', |
||
257 | 'type' => 'null', |
||
258 | 'internaltype' => 'null', |
||
259 | 'public' => false, |
||
260 | ), |
||
261 | ); |
||
262 | |||
263 | |||
264 | /** |
||
265 | * Initializes the object. |
||
266 | * |
||
267 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object |
||
268 | */ |
||
269 | public function __construct( \Aimeos\MShop\Context\Item\Iface $context ) |
||
313 | |||
314 | |||
315 | /** |
||
316 | * Counts the number items that are available for the values of the given key. |
||
317 | * |
||
318 | * @param \Aimeos\MW\Criteria\Iface $search Search criteria |
||
319 | * @param array|string $key Search key or list of key to aggregate items for |
||
320 | * @param string|null $value Search key for aggregating the value column |
||
321 | * @param string|null $type Type of the aggregation, empty string for count or "sum" or "avg" (average) |
||
322 | * @return \Aimeos\Map List of the search keys as key and the number of counted items as value |
||
323 | */ |
||
324 | public function aggregate( \Aimeos\MW\Criteria\Iface $search, $key, string $value = null, string $type = null ) : \Aimeos\Map |
||
379 | |||
380 | |||
381 | /** |
||
382 | * Removes old entries from the storage. |
||
383 | * |
||
384 | * @param iterable $siteids List of IDs for sites whose entries should be deleted |
||
385 | * @return \Aimeos\MShop\Common\Manager\Iface Same object for fluent interface |
||
386 | */ |
||
387 | public function clear( iterable $siteids ) : \Aimeos\MShop\Common\Manager\Iface |
||
398 | |||
399 | |||
400 | /** |
||
401 | * Removes multiple items. |
||
402 | * |
||
403 | * @param \Aimeos\MShop\Common\Item\Iface[]|string[] $itemIds List of item objects or IDs of the items |
||
404 | * @return \Aimeos\MShop\Common\Manager\Iface Manager object for chaining method calls |
||
405 | */ |
||
406 | public function delete( $itemIds ) : \Aimeos\MShop\Common\Manager\Iface |
||
411 | |||
412 | |||
413 | /** |
||
414 | * Returns the list attributes that can be used for searching. |
||
415 | * |
||
416 | * @param bool $withsub Return also attributes of sub-managers if true |
||
417 | * @return array List of attribute items implementing \Aimeos\MW\Criteria\Attribute\Iface |
||
418 | */ |
||
419 | public function getSearchAttributes( bool $withsub = true ) : array |
||
424 | |||
425 | |||
426 | /** |
||
427 | * Saves a customer item object. |
||
428 | * |
||
429 | * @param \Aimeos\MShop\Customer\Item\Iface $item Customer item object |
||
430 | * @param boolean $fetch True if the new ID should be returned in the item |
||
431 | * @return \Aimeos\MShop\Customer\Item\Iface $item Updated item including the generated ID |
||
432 | */ |
||
433 | public function saveItem( \Aimeos\MShop\Customer\Item\Iface $item, bool $fetch = true ) : \Aimeos\MShop\Customer\Item\Iface |
||
617 | |||
618 | |||
619 | /** |
||
620 | * Returns the item objects matched by the given search criteria. |
||
621 | * |
||
622 | * @param \Aimeos\MW\Criteria\Iface $search Search criteria object |
||
623 | * @param integer &$total Number of items that are available in total |
||
624 | * @return \Aimeos\Map List of items implementing \Aimeos\MShop\Customer\Item\Iface |
||
625 | * @throws \Aimeos\MShop\Customer\Exception If creating items failed |
||
626 | */ |
||
627 | public function search( \Aimeos\MW\Criteria\Iface $search, array $ref = [], int &$total = null ) : \Aimeos\Map |
||
670 | |||
671 | |||
672 | /** |
||
673 | * Returns a new manager for customer extensions |
||
674 | * |
||
675 | * @param string $manager Name of the sub manager type in lower case |
||
676 | * @param string|null $name Name of the implementation, will be from configuration (or Default) if null |
||
677 | * @return mixed Manager for different extensions, e.g stock, tags, locations, etc. |
||
678 | */ |
||
679 | public function getSubManager( string $manager, string $name = null ) : \Aimeos\MShop\Common\Manager\Iface |
||
683 | } |
||
684 |
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: