1 | <?php |
||
20 | abstract class Base |
||
21 | extends \Aimeos\Controller\Frontend\Base |
||
22 | implements \Aimeos\Controller\Frontend\Common\Decorator\Iface, \Aimeos\Controller\Frontend\Service\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 ) |
||
46 | |||
47 | |||
48 | /** |
||
49 | * Passes unknown methods to wrapped objects. |
||
50 | * |
||
51 | * @param string $name Name of the method |
||
52 | * @param array $param List of method parameter |
||
53 | * @return mixed Returns the value of the called method |
||
54 | * @throws \Aimeos\Controller\Frontend\Exception If method call failed |
||
55 | */ |
||
56 | public function __call( $name, array $param ) |
||
60 | |||
61 | |||
62 | /** |
||
63 | * Returns a list of attributes that are invalid. |
||
64 | * |
||
65 | * @param string $serviceId Identifier of the service option chosen by the customer |
||
66 | * @param array $attributes List of key/value pairs with name of the attribute from attribute definition object as |
||
67 | * key and the string entered by the customer as value |
||
68 | * @return array List of key/value pairs of attributes keys and an error message for values that are invalid or |
||
69 | * missing |
||
70 | */ |
||
71 | public function checkAttributes( $serviceId, array $attributes ) |
||
75 | |||
76 | |||
77 | /** |
||
78 | * Returns the service item for the given ID |
||
79 | * |
||
80 | * @param string $id Unique service ID |
||
|
|||
81 | * @param array $ref List of domains for which the items referenced by the services should be fetched too |
||
82 | * @return \Aimeos\MShop\Service\Item\Iface Service item object |
||
83 | */ |
||
84 | public function getProvider( $serviceId, $ref = ['media', 'price', 'text'] ) |
||
88 | |||
89 | |||
90 | /** |
||
91 | * Returns the service providers for the given |
||
92 | * |
||
93 | * @param string $type Service type, e.g. "delivery" (shipping related) or "payment" (payment related) |
||
94 | * @param string $serviceId Identifier of one of the service option returned by getService() |
||
95 | * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket object |
||
96 | * @return array List of attribute definitions implementing \Aimeos\MW\Criteria\Attribute\Iface |
||
97 | */ |
||
98 | public function getProviders( $type, $ref = ['media', 'price', 'text'] ) |
||
102 | |||
103 | |||
104 | |||
105 | /** |
||
106 | * Returns the service items that are available for the service type and the content of the basket. |
||
107 | * |
||
108 | * @param string $type Service type, e.g. "delivery" (shipping related) or "payment" (payment related) |
||
109 | * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket of the user |
||
110 | * @param array $ref List of domains for which the items referenced by the services should be fetched too |
||
111 | * @return array List of service items implementing \Aimeos\MShop\Service\Item\Iface with referenced items |
||
112 | * @deprecated Use getProviders() instead |
||
113 | */ |
||
114 | public function getServices( $type, \Aimeos\MShop\Order\Item\Base\Iface $basket, |
||
119 | |||
120 | |||
121 | /** |
||
122 | * Returns the list of attribute definitions which must be used to render the input form where the customer can |
||
123 | * enter or chose the required data necessary by the service provider. |
||
124 | * |
||
125 | * @param string $type Service type, e.g. "delivery" (shipping related) or "payment" (payment related) |
||
126 | * @param string $serviceId Identifier of one of the service option returned by getService() |
||
127 | * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket object |
||
128 | * @return array List of attribute definitions implementing \Aimeos\MW\Criteria\Attribute\Iface |
||
129 | * @deprecated Use getProvider() instead |
||
130 | */ |
||
131 | public function getServiceAttributes( $type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket ) |
||
135 | |||
136 | |||
137 | /** |
||
138 | * Returns the price of the service. |
||
139 | * |
||
140 | * @param string $type Service type, e.g. "delivery" (shipping related) or "payment" (payment related) |
||
141 | * @param string $serviceId Identifier of one of the service option returned by getService() |
||
142 | * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket with products |
||
143 | * @return \Aimeos\MShop\Price\Item\Iface Price item |
||
144 | * @throws \Aimeos\Controller\Frontend\Service\Exception If no active service provider for this ID is available |
||
145 | * @throws \Aimeos\MShop\Exception If service provider isn't available |
||
146 | * @throws \Exception If an error occurs |
||
147 | * @deprecated Use getProvider() instead |
||
148 | */ |
||
149 | public function getServicePrice( $type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket ) |
||
153 | |||
154 | |||
155 | /** |
||
156 | * Returns a list of attributes that are invalid. |
||
157 | * |
||
158 | * @param string $type Service type, e.g. "delivery" (shipping related) or "payment" (payment related) |
||
159 | * @param string $serviceId Identifier of the service option chosen by the customer |
||
160 | * @param array $attributes List of key/value pairs with name of the attribute from attribute definition object as |
||
161 | * key and the string entered by the customer as value |
||
162 | * @return array List of key/value pairs of attributes keys and an error message for values that are invalid or |
||
163 | * missing |
||
164 | * @deprecated Use checkAttributes() instead |
||
165 | */ |
||
166 | public function checkServiceAttributes( $type, $serviceId, array $attributes ) |
||
170 | |||
171 | |||
172 | /** |
||
173 | * Returns the frontend controller |
||
174 | * |
||
175 | * @return \Aimeos\Controller\Frontend\Service\Iface Frontend controller object |
||
176 | */ |
||
177 | protected function getController() |
||
181 | } |
||
182 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.