@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * @param string $name Name of the manager |
27 | 27 | * @return \Aimeos\MShop\Common\Manager\Iface Manager object |
28 | 28 | */ |
29 | - public function createManager( $name ); |
|
29 | + public function createManager($name); |
|
30 | 30 | |
31 | 31 | |
32 | 32 | /** |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * @return \Aimeos\MW\Criteria\Iface Criteria object for filtering |
37 | 37 | * @since 2017.03 |
38 | 38 | */ |
39 | - public function createFilter( $default = true ); |
|
39 | + public function createFilter($default = true); |
|
40 | 40 | |
41 | 41 | |
42 | 42 | /** |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * @return array Associative list of items implementing \Aimeos\MShop\Catalog\Item\Iface with their IDs as keys |
48 | 48 | * @since 2017.03 |
49 | 49 | */ |
50 | - public function getPath( $id, array $domains = array( 'text', 'media' ) ); |
|
50 | + public function getPath($id, array $domains = array('text', 'media')); |
|
51 | 51 | |
52 | 52 | |
53 | 53 | /** |
@@ -61,6 +61,6 @@ discard block |
||
61 | 61 | * @return \Aimeos\MShop\Catalog\Item\Iface Catalog node, maybe with children depending on the level constant |
62 | 62 | * @since 2017.03 |
63 | 63 | */ |
64 | - public function getTree( $id = null, array $domains = array( 'text', 'media' ), |
|
65 | - $level = \Aimeos\MW\Tree\Manager\Base::LEVEL_TREE, \Aimeos\MW\Criteria\Iface $search = null ); |
|
64 | + public function getTree($id = null, array $domains = array('text', 'media'), |
|
65 | + $level = \Aimeos\MW\Tree\Manager\Base::LEVEL_TREE, \Aimeos\MW\Criteria\Iface $search = null); |
|
66 | 66 | } |
@@ -29,9 +29,9 @@ discard block |
||
29 | 29 | * @return \Aimeos\MShop\Common\Manager\Iface Manager object |
30 | 30 | * @since 2015.08 |
31 | 31 | */ |
32 | - public function createManager( $name ) |
|
32 | + public function createManager($name) |
|
33 | 33 | { |
34 | - return \Aimeos\MShop\Factory::createManager( $this->getContext(), $name ); |
|
34 | + return \Aimeos\MShop\Factory::createManager($this->getContext(), $name); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | |
@@ -42,9 +42,9 @@ discard block |
||
42 | 42 | * @return \Aimeos\MW\Criteria\Iface Criteria object for filtering |
43 | 43 | * @since 2017.03 |
44 | 44 | */ |
45 | - public function createFilter( $default = true ) |
|
45 | + public function createFilter($default = true) |
|
46 | 46 | { |
47 | - return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'catalog' )->createSearch( $default ); |
|
47 | + return \Aimeos\MShop\Factory::createManager($this->getContext(), 'catalog')->createSearch($default); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | * @return array Associative list of items implementing \Aimeos\MShop\Catalog\Item\Iface with their IDs as keys |
57 | 57 | * @since 2017.03 |
58 | 58 | */ |
59 | - public function getPath( $id, array $domains = array( 'text', 'media' ) ) |
|
59 | + public function getPath($id, array $domains = array('text', 'media')) |
|
60 | 60 | { |
61 | - return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'catalog' )->getPath( $id, $domains ); |
|
61 | + return \Aimeos\MShop\Factory::createManager($this->getContext(), 'catalog')->getPath($id, $domains); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | |
@@ -73,10 +73,10 @@ discard block |
||
73 | 73 | * @return \Aimeos\MShop\Catalog\Item\Iface Catalog node, maybe with children depending on the level constant |
74 | 74 | * @since 2017.03 |
75 | 75 | */ |
76 | - public function getTree( $id = null, array $domains = array( 'text', 'media' ), |
|
77 | - $level = \Aimeos\MW\Tree\Manager\Base::LEVEL_TREE, \Aimeos\MW\Criteria\Iface $search = null ) |
|
76 | + public function getTree($id = null, array $domains = array('text', 'media'), |
|
77 | + $level = \Aimeos\MW\Tree\Manager\Base::LEVEL_TREE, \Aimeos\MW\Criteria\Iface $search = null) |
|
78 | 78 | { |
79 | - return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'catalog' )->getTree( $id, $domains, $level, $search ); |
|
79 | + return \Aimeos\MShop\Factory::createManager($this->getContext(), 'catalog')->getTree($id, $domains, $level, $search); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | |
@@ -88,9 +88,9 @@ discard block |
||
88 | 88 | * @since 2015.08 |
89 | 89 | * @deprecated Use createFilter() instead |
90 | 90 | */ |
91 | - public function createCatalogFilter( $default = true ) |
|
91 | + public function createCatalogFilter($default = true) |
|
92 | 92 | { |
93 | - return $this->createFilter( $default ); |
|
93 | + return $this->createFilter($default); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | |
@@ -103,9 +103,9 @@ discard block |
||
103 | 103 | * @since 2015.08 |
104 | 104 | * @deprecated Use getPath() instead |
105 | 105 | */ |
106 | - public function getCatalogPath( $id, array $domains = array( 'text', 'media' ) ) |
|
106 | + public function getCatalogPath($id, array $domains = array('text', 'media')) |
|
107 | 107 | { |
108 | - return $this->getPath( $id, $domains ); |
|
108 | + return $this->getPath($id, $domains); |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | |
@@ -121,10 +121,10 @@ discard block |
||
121 | 121 | * @since 2015.08 |
122 | 122 | * @deprecated Use getTree() instead |
123 | 123 | */ |
124 | - public function getCatalogTree( $id = null, array $domains = array( 'text', 'media' ), |
|
125 | - $level = \Aimeos\MW\Tree\Manager\Base::LEVEL_TREE, \Aimeos\MW\Criteria\Iface $search = null ) |
|
124 | + public function getCatalogTree($id = null, array $domains = array('text', 'media'), |
|
125 | + $level = \Aimeos\MW\Tree\Manager\Base::LEVEL_TREE, \Aimeos\MW\Criteria\Iface $search = null) |
|
126 | 126 | { |
127 | - return $this->getTree( $id, $domains, $level, $search ); |
|
127 | + return $this->getTree($id, $domains, $level, $search); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | |
@@ -138,10 +138,10 @@ discard block |
||
138 | 138 | * @since 2015.08 |
139 | 139 | * @deprecated Use getItems() method in index controller instead |
140 | 140 | */ |
141 | - public function getProductItems( array $ids, array $domains = array( 'media', 'price', 'text' ) ) |
|
141 | + public function getProductItems(array $ids, array $domains = array('media', 'price', 'text')) |
|
142 | 142 | { |
143 | - $cntl = \Aimeos\Controller\Frontend\Factory::createController( $this->getContext(), 'product' ); |
|
144 | - return $cntl->getItems( $ids, $domains ); |
|
143 | + $cntl = \Aimeos\Controller\Frontend\Factory::createController($this->getContext(), 'product'); |
|
144 | + return $cntl->getItems($ids, $domains); |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | |
@@ -154,10 +154,10 @@ discard block |
||
154 | 154 | * @since 2015.08 |
155 | 155 | * @deprecated Use method in index controller instead |
156 | 156 | */ |
157 | - public function aggregateIndex( \Aimeos\MW\Criteria\Iface $filter, $key ) |
|
157 | + public function aggregateIndex(\Aimeos\MW\Criteria\Iface $filter, $key) |
|
158 | 158 | { |
159 | - $cntl = \Aimeos\Controller\Frontend\Factory::createController( $this->getContext(), 'product' ); |
|
160 | - return $cntl->aggregate( $filter, $key ); |
|
159 | + $cntl = \Aimeos\Controller\Frontend\Factory::createController($this->getContext(), 'product'); |
|
160 | + return $cntl->aggregate($filter, $key); |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | |
@@ -173,10 +173,10 @@ discard block |
||
173 | 173 | * @since 2015.08 |
174 | 174 | * @deprecated Use method in index controller instead |
175 | 175 | */ |
176 | - public function createIndexFilter( $sort = null, $direction = '+', $start = 0, $size = 100, $listtype = 'default' ) |
|
176 | + public function createIndexFilter($sort = null, $direction = '+', $start = 0, $size = 100, $listtype = 'default') |
|
177 | 177 | { |
178 | - $cntl = \Aimeos\Controller\Frontend\Factory::createController( $this->getContext(), 'product' ); |
|
179 | - return $cntl->createFilter( $sort, $direction, $start, $size, $listtype ); |
|
178 | + $cntl = \Aimeos\Controller\Frontend\Factory::createController($this->getContext(), 'product'); |
|
179 | + return $cntl->createFilter($sort, $direction, $start, $size, $listtype); |
|
180 | 180 | } |
181 | 181 | |
182 | 182 | |
@@ -193,12 +193,12 @@ discard block |
||
193 | 193 | * @since 2015.08 |
194 | 194 | * @deprecated Use createIndexFilter() and addIndexFilterCategory() instead |
195 | 195 | */ |
196 | - public function createIndexFilterCategory( $catid, $sort = null, $direction = '+', $start = 0, $size = 100, $listtype = 'default' ) |
|
196 | + public function createIndexFilterCategory($catid, $sort = null, $direction = '+', $start = 0, $size = 100, $listtype = 'default') |
|
197 | 197 | { |
198 | - $cntl = \Aimeos\Controller\Frontend\Factory::createController( $this->getContext(), 'product' ); |
|
198 | + $cntl = \Aimeos\Controller\Frontend\Factory::createController($this->getContext(), 'product'); |
|
199 | 199 | |
200 | - $filter = $cntl->createFilter( $sort, $direction, $start, $size, $listtype ); |
|
201 | - $filter = $cntl->addFilterCategory( $filter, $catid, \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE, $sort, $direction, $listtype ); |
|
200 | + $filter = $cntl->createFilter($sort, $direction, $start, $size, $listtype); |
|
201 | + $filter = $cntl->addFilterCategory($filter, $catid, \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE, $sort, $direction, $listtype); |
|
202 | 202 | |
203 | 203 | return $filter; |
204 | 204 | } |
@@ -217,12 +217,12 @@ discard block |
||
217 | 217 | * @since 2015.08 |
218 | 218 | * @deprecated Use createIndexFilter() and addIndexFilterText() instead |
219 | 219 | */ |
220 | - public function createIndexFilterText( $input, $sort = null, $direction = '+', $start = 0, $size = 100, $listtype = 'default' ) |
|
220 | + public function createIndexFilterText($input, $sort = null, $direction = '+', $start = 0, $size = 100, $listtype = 'default') |
|
221 | 221 | { |
222 | - $cntl = \Aimeos\Controller\Frontend\Factory::createController( $this->getContext(), 'product' ); |
|
222 | + $cntl = \Aimeos\Controller\Frontend\Factory::createController($this->getContext(), 'product'); |
|
223 | 223 | |
224 | - $filter = $cntl->createFilter( $sort, $direction, $start, $size, $listtype ); |
|
225 | - $filter = $cntl->addFilterText( $filter, $input, $sort, $direction, $listtype ); |
|
224 | + $filter = $cntl->createFilter($sort, $direction, $start, $size, $listtype); |
|
225 | + $filter = $cntl->addFilterText($filter, $input, $sort, $direction, $listtype); |
|
226 | 226 | |
227 | 227 | return $filter; |
228 | 228 | } |
@@ -237,10 +237,10 @@ discard block |
||
237 | 237 | * @since 2015.08 |
238 | 238 | * @deprecated Use method in index controller instead |
239 | 239 | */ |
240 | - public function addIndexFilterCategory( \Aimeos\MW\Criteria\Iface $search, $catid ) |
|
240 | + public function addIndexFilterCategory(\Aimeos\MW\Criteria\Iface $search, $catid) |
|
241 | 241 | { |
242 | - $cntl = \Aimeos\Controller\Frontend\Factory::createController( $this->getContext(), 'product' ); |
|
243 | - return $cntl->addFilterCategory( $search, $catid ); |
|
242 | + $cntl = \Aimeos\Controller\Frontend\Factory::createController($this->getContext(), 'product'); |
|
243 | + return $cntl->addFilterCategory($search, $catid); |
|
244 | 244 | } |
245 | 245 | |
246 | 246 | |
@@ -254,10 +254,10 @@ discard block |
||
254 | 254 | * @since 2015.08 |
255 | 255 | * @deprecated Use method in index controller instead |
256 | 256 | */ |
257 | - public function addIndexFilterText( \Aimeos\MW\Criteria\Iface $search, $input, $listtype = 'default' ) |
|
257 | + public function addIndexFilterText(\Aimeos\MW\Criteria\Iface $search, $input, $listtype = 'default') |
|
258 | 258 | { |
259 | - $cntl = \Aimeos\Controller\Frontend\Factory::createController( $this->getContext(), 'product' ); |
|
260 | - return $cntl->addFilterText( $search, $input, $listtype ); |
|
259 | + $cntl = \Aimeos\Controller\Frontend\Factory::createController($this->getContext(), 'product'); |
|
260 | + return $cntl->addFilterText($search, $input, $listtype); |
|
261 | 261 | } |
262 | 262 | |
263 | 263 | |
@@ -271,10 +271,10 @@ discard block |
||
271 | 271 | * @since 2015.08 |
272 | 272 | * @deprecated Use method in index controller instead |
273 | 273 | */ |
274 | - public function getIndexItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = array( 'media', 'price', 'text' ), &$total = null ) |
|
274 | + public function getIndexItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = array('media', 'price', 'text'), &$total = null) |
|
275 | 275 | { |
276 | - $cntl = \Aimeos\Controller\Frontend\Factory::createController( $this->getContext(), 'product' ); |
|
277 | - return $cntl->searchItems( $filter, $domains, $total ); |
|
276 | + $cntl = \Aimeos\Controller\Frontend\Factory::createController($this->getContext(), 'product'); |
|
277 | + return $cntl->searchItems($filter, $domains, $total); |
|
278 | 278 | } |
279 | 279 | |
280 | 280 | |
@@ -291,37 +291,37 @@ discard block |
||
291 | 291 | * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching |
292 | 292 | * @deprecated Use createFilter() method in index controller instead |
293 | 293 | */ |
294 | - public function createTextFilter( $input, $sort = null, $direction = '+', $start = 0, $size = 25, $listtype = 'default', $type = 'name' ) |
|
294 | + public function createTextFilter($input, $sort = null, $direction = '+', $start = 0, $size = 25, $listtype = 'default', $type = 'name') |
|
295 | 295 | { |
296 | 296 | $locale = $this->getContext()->getLocale(); |
297 | 297 | $langid = $locale->getLanguageId(); |
298 | 298 | |
299 | - $search = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'index/text' )->createSearch( true ); |
|
299 | + $search = \Aimeos\MShop\Factory::createManager($this->getContext(), 'index/text')->createSearch(true); |
|
300 | 300 | |
301 | 301 | $expr = array( |
302 | - $search->compare( '>', $search->createFunction( 'index.text.relevance', array( $listtype, $langid, $input ) ), 0 ), |
|
303 | - $search->compare( '>', $search->createFunction( 'index.text.value', array( $listtype, $langid, $type, 'product' ) ), '' ), |
|
302 | + $search->compare('>', $search->createFunction('index.text.relevance', array($listtype, $langid, $input)), 0), |
|
303 | + $search->compare('>', $search->createFunction('index.text.value', array($listtype, $langid, $type, 'product')), ''), |
|
304 | 304 | ); |
305 | 305 | |
306 | 306 | $sortations = array(); |
307 | 307 | |
308 | - switch( $sort ) |
|
308 | + switch ($sort) |
|
309 | 309 | { |
310 | 310 | case 'name': |
311 | - $cmpfunc = $search->createFunction( 'index.text.value', array( $listtype, $langid, 'name', 'product' ) ); |
|
312 | - $expr[] = $search->compare( '>=', $cmpfunc, '' ); |
|
311 | + $cmpfunc = $search->createFunction('index.text.value', array($listtype, $langid, 'name', 'product')); |
|
312 | + $expr[] = $search->compare('>=', $cmpfunc, ''); |
|
313 | 313 | |
314 | - $sortfunc = $search->createFunction( 'sort:index.text.value', array( $listtype, $langid, 'name' ) ); |
|
315 | - $sortations[] = $search->sort( $direction, $sortfunc ); |
|
314 | + $sortfunc = $search->createFunction('sort:index.text.value', array($listtype, $langid, 'name')); |
|
315 | + $sortations[] = $search->sort($direction, $sortfunc); |
|
316 | 316 | break; |
317 | 317 | |
318 | 318 | case 'relevance': |
319 | 319 | // we don't need to sort by 'sort:index.text.relevance' because it's a boolean match (relevance is either 0 or 1) |
320 | 320 | } |
321 | 321 | |
322 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
323 | - $search->setSortations( $sortations ); |
|
324 | - $search->setSlice( $start, $size ); |
|
322 | + $search->setConditions($search->combine('&&', $expr)); |
|
323 | + $search->setSortations($sortations); |
|
324 | + $search->setSlice($start, $size); |
|
325 | 325 | |
326 | 326 | return $search; |
327 | 327 | } |
@@ -334,8 +334,8 @@ discard block |
||
334 | 334 | * @return array Associative list of the product ID as key and the product text as value |
335 | 335 | * @deprecated Use searchItems() method in index controller to retrieve product items instead |
336 | 336 | */ |
337 | - public function getTextList( \Aimeos\MW\Criteria\Iface $filter ) |
|
337 | + public function getTextList(\Aimeos\MW\Criteria\Iface $filter) |
|
338 | 338 | { |
339 | - return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'index/text' )->searchTexts( $filter ); |
|
339 | + return \Aimeos\MShop\Factory::createManager($this->getContext(), 'index/text')->searchTexts($filter); |
|
340 | 340 | } |
341 | 341 | } |