1 | <?php |
||
20 | abstract class Base |
||
21 | extends \Aimeos\Controller\Frontend\Base |
||
22 | implements \Aimeos\Controller\Frontend\Common\Decorator\Iface, \Aimeos\Controller\Frontend\Attribute\Iface |
||
23 | { |
||
24 | private $controller; |
||
25 | |||
26 | |||
27 | /** |
||
28 | * Initializes the controller decorator. |
||
29 | * |
||
30 | * @param \Aimeos\Controller\Frontend\Iface $controller Controller object |
||
31 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects |
||
32 | */ |
||
33 | public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context ) |
||
40 | |||
41 | |||
42 | /** |
||
43 | * Passes unknown methods to wrapped objects. |
||
44 | * |
||
45 | * @param string $name Name of the method |
||
46 | * @param array $param List of method parameter |
||
47 | * @return mixed Returns the value of the called method |
||
48 | * @throws \Aimeos\Controller\Frontend\Exception If method call failed |
||
49 | */ |
||
50 | public function __call( $name, array $param ) |
||
54 | |||
55 | |||
56 | /** |
||
57 | * Clones objects in controller and resets values |
||
58 | */ |
||
59 | public function __clone() |
||
63 | |||
64 | |||
65 | /** |
||
66 | * Adds attribute IDs for filtering |
||
67 | * |
||
68 | * @param array|string $attrIds Attribute ID or list of IDs |
||
69 | * @return \Aimeos\Controller\Frontend\Attribute\Iface Attribute controller for fluent interface |
||
70 | * @since 2019.04 |
||
71 | */ |
||
72 | public function attribute( $attrIds ) |
||
77 | |||
78 | |||
79 | /** |
||
80 | * Adds generic condition for filtering attributes |
||
81 | * |
||
82 | * @param string $operator Comparison operator, e.g. "==", "!=", "<", "<=", ">=", ">", "=~", "~=" |
||
83 | * @param string $key Search key defined by the attribute manager, e.g. "attribute.status" |
||
84 | * @param array|string $value Value or list of values to compare to |
||
85 | * @return \Aimeos\Controller\Frontend\Attribute\Iface Attribute controller for fluent interface |
||
86 | * @since 2019.04 |
||
87 | */ |
||
88 | public function compare( $operator, $key, $value ) |
||
93 | |||
94 | |||
95 | /** |
||
96 | * Adds the domain of the attributes for filtering |
||
97 | * |
||
98 | * @param string $domain Domain of the attributes |
||
99 | * @return \Aimeos\Controller\Frontend\Attribute\Iface Attribute controller for fluent interface |
||
100 | * @since 2019.04 |
||
101 | */ |
||
102 | public function domain( $domain ) |
||
107 | |||
108 | |||
109 | /** |
||
110 | * Returns the attribute for the given attribute ID |
||
111 | * |
||
112 | * @param string $id Unique attribute ID |
||
113 | * @param string[] $domains Domain names of items that are associated with the attributes and that should be fetched too |
||
114 | * @return \Aimeos\MShop\Attribute\Item\Iface Attribute item including the referenced domains items |
||
115 | * @since 2019.04 |
||
116 | */ |
||
117 | public function get( $id, $domains = ['media', 'price', 'text'] ) |
||
121 | |||
122 | |||
123 | /** |
||
124 | * Returns the attribute for the given attribute code |
||
125 | * |
||
126 | * @param string $code Unique attribute code |
||
127 | * @param string[] $domains Domain names of items that are associated with the attributes and that should be fetched too |
||
128 | * @param string $type Type assigned to the attribute |
||
129 | * @return \Aimeos\MShop\Attribute\Item\Iface Attribute item including the referenced domains items |
||
130 | * @since 2019.04 |
||
131 | */ |
||
132 | public function find( $code, $domains = ['media', 'price', 'text'], $type ) |
||
136 | |||
137 | |||
138 | /** |
||
139 | * Parses the given array and adds the conditions to the list of conditions |
||
140 | * |
||
141 | * @param array $conditions List of conditions, e.g. ['&&' => [['>' => ['attribute.status' => 0]], ['==' => ['attribute.type' => 'color']]]] |
||
142 | * @return \Aimeos\Controller\Frontend\Attribute\Iface Attribute controller for fluent interface |
||
143 | * @since 2019.04 |
||
144 | */ |
||
145 | public function parse( array $conditions ) |
||
150 | |||
151 | |||
152 | /** |
||
153 | * Returns the attributes filtered by the previously assigned conditions |
||
154 | * |
||
155 | * @param string[] $domains Domain names of items that are associated with the attributes and that should be fetched too |
||
156 | * @param integer &$total Parameter where the total number of found attributes will be stored in |
||
157 | * @return \Aimeos\MShop\Attribute\Item\Iface[] Ordered list of attribute items |
||
158 | * @since 2019.04 |
||
159 | */ |
||
160 | public function search( $domains = ['media', 'price', 'text'], &$total = null ) |
||
164 | |||
165 | |||
166 | /** |
||
167 | * Sets the start value and the number of returned attributes for slicing the list of found attributes |
||
168 | * |
||
169 | * @param integer $start Start value of the first attribute in the list |
||
170 | * @param integer $limit Number of returned attributes |
||
171 | * @return \Aimeos\Controller\Frontend\Attribute\Iface Attribute controller for fluent interface |
||
172 | * @since 2019.04 |
||
173 | */ |
||
174 | public function slice( $start, $limit ) |
||
179 | |||
180 | |||
181 | /** |
||
182 | * Sets the sorting of the attribute list |
||
183 | * |
||
184 | * @param string|null $key Sorting of the attribute list like "position" or "-position", null for no sortation |
||
185 | * @return \Aimeos\Controller\Frontend\Attribute\Iface Attribute controller for fluent interface |
||
186 | * @since 2019.04 |
||
187 | */ |
||
188 | public function sort( $key = null ) |
||
193 | |||
194 | |||
195 | /** |
||
196 | * Adds attribute types for filtering |
||
197 | * |
||
198 | * @param array|string $codes Attribute ID or list of IDs |
||
199 | * @return \Aimeos\Controller\Frontend\Attribute\Iface Attribute controller for fluent interface |
||
200 | * @since 2019.04 |
||
201 | */ |
||
202 | public function type( $codes ) |
||
207 | |||
208 | |||
209 | /** |
||
210 | * Returns the frontend controller |
||
211 | * |
||
212 | * @return \Aimeos\Controller\Frontend\Attribute\Iface Frontend controller object |
||
213 | */ |
||
214 | protected function getController() |
||
218 | } |
||
219 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.