1 | <?php |
||
20 | abstract class Base |
||
21 | extends \Aimeos\Controller\Frontend\Base |
||
22 | implements \Aimeos\Controller\Frontend\Common\Decorator\Iface, \Aimeos\Controller\Frontend\Subscription\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 | * Cancels an active subscription |
||
64 | * |
||
65 | * @param string $id Unique subscription ID |
||
66 | * @return \Aimeos\MShop\Subscription\Item\Iface Canceled subscription item |
||
67 | */ |
||
68 | public function cancel( $id ) |
||
72 | |||
73 | |||
74 | /** |
||
75 | * Returns the filter for searching items |
||
76 | * |
||
77 | * @return \Aimeos\MW\Criteria\Iface Filter object |
||
78 | */ |
||
79 | public function createFilter() |
||
83 | |||
84 | |||
85 | /** |
||
86 | * Returns the available interval attribute items |
||
87 | * |
||
88 | * @return \Aimeos\MShop\Attribute\Item\Iface[] Associative list of intervals as keys and interval attribute items as values |
||
89 | */ |
||
90 | public function getIntervals() |
||
94 | |||
95 | |||
96 | /** |
||
97 | * Returns the subscription item for the given ID |
||
98 | * |
||
99 | * @param string $id Unique subscription ID |
||
100 | * @return \Aimeos\MShop\Subscription\Item\Iface Subscription object |
||
101 | */ |
||
102 | public function getItem( $id ) |
||
106 | |||
107 | |||
108 | /** |
||
109 | * Saves the modified subscription item |
||
110 | * |
||
111 | * @param \Aimeos\MShop\Subscription\Item\Iface $item Subscription object |
||
112 | * @return \Aimeos\MShop\Subscription\Item\Iface Saved subscription item |
||
113 | */ |
||
114 | public function saveItem( \Aimeos\MShop\Subscription\Item\Iface $item ) |
||
118 | |||
119 | |||
120 | /** |
||
121 | * Returns the subscription items based on the given filter that belong to the current user |
||
122 | * |
||
123 | * @param \Aimeos\MW\Criteria\Iface Filter object |
||
124 | * @param integer &$total|null Variable that will contain the total number of available items |
||
125 | * @return \Aimeos\MShop\Subscription\Item\Iface[] Associative list of IDs as keys and subscription objects as values |
||
126 | */ |
||
127 | public function searchItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null ) |
||
131 | |||
132 | |||
133 | /** |
||
134 | * Returns the frontend controller |
||
135 | * |
||
136 | * @return \Aimeos\Controller\Frontend\Subscription\Iface Frontend controller object |
||
137 | */ |
||
138 | protected function getController() |
||
142 | } |
||
143 |