1 | <?php |
||
20 | class Standard |
||
21 | extends \Aimeos\MShop\Common\Item\Base |
||
|
|||
22 | implements \Aimeos\MShop\Subscription\Item\Iface |
||
23 | { |
||
24 | private $values; |
||
25 | |||
26 | |||
27 | /** |
||
28 | * Initializes the object with the given values. |
||
29 | * |
||
30 | * @param array $values Associative list of values from database |
||
31 | */ |
||
32 | public function __construct( array $values = [] ) |
||
38 | |||
39 | |||
40 | /** |
||
41 | * Returns the ID of the ordered product |
||
42 | * |
||
43 | * @return string ID of the ordered product |
||
44 | */ |
||
45 | public function getOrderProductId() |
||
51 | |||
52 | |||
53 | /** |
||
54 | * Sets the ID of the ordered product item which the customer subscribed for |
||
55 | * |
||
56 | * @param string $id ID of the ordered product |
||
57 | * @return \Aimeos\MShop\Subscription\Item\Iface Subscription item for chaining method calls |
||
58 | */ |
||
59 | public function setOrderProductId( $id ) |
||
69 | |||
70 | |||
71 | /** |
||
72 | * Returns the date of the next subscription renewal |
||
73 | * |
||
74 | * @return string ISO date in "YYYY-MM-DD HH:mm:ss" format |
||
75 | */ |
||
76 | public function getDateNext() |
||
82 | |||
83 | |||
84 | /** |
||
85 | * Sets the date of the next subscription renewal |
||
86 | * |
||
87 | * @param string $date ISO date in "YYYY-MM-DD HH:mm:ss" format |
||
88 | * @return \Aimeos\MShop\Subscription\Item\Iface Subscription item for chaining method calls |
||
89 | */ |
||
90 | public function setDateNext( $date ) |
||
100 | |||
101 | |||
102 | /** |
||
103 | * Returns the date when the subscription renewal ends |
||
104 | * |
||
105 | * @return string|null ISO date in "YYYY-MM-DD HH:mm:ss" format |
||
106 | */ |
||
107 | public function getDateEnd() |
||
113 | |||
114 | |||
115 | /** |
||
116 | * Sets the delivery date of the invoice. |
||
117 | * |
||
118 | * @param string|null $date ISO date in "YYYY-MM-DD HH:mm:ss" format |
||
119 | * @return \Aimeos\MShop\Subscription\Item\Iface Subscription item for chaining method calls |
||
120 | */ |
||
121 | public function setDateEnd( $date ) |
||
131 | |||
132 | |||
133 | /** |
||
134 | * Returns the time interval to pass between the subscription renewals |
||
135 | * |
||
136 | * @return string PHP time interval, e.g. "P1M2W" |
||
137 | */ |
||
138 | public function getInterval() |
||
144 | |||
145 | |||
146 | /** |
||
147 | * Sets the time interval to pass between the subscription renewals |
||
148 | * |
||
149 | * @param string $value PHP time interval, e.g. "P1M2W" |
||
150 | * @return \Aimeos\MShop\Subscription\Item\Iface Subscription item for chaining method calls |
||
151 | */ |
||
152 | public function setInterval( $value ) |
||
162 | |||
163 | |||
164 | /** |
||
165 | * Returns the status of the subscriptions |
||
166 | * |
||
167 | * @return integer Subscription status, i.e. "1" for enabled, "0" for disabled |
||
168 | */ |
||
169 | public function getStatus() |
||
175 | |||
176 | |||
177 | /** |
||
178 | * Sets the status of the subscriptions |
||
179 | * |
||
180 | * @return integer Subscription status, i.e. "1" for enabled, "0" for disabled |
||
181 | * @return \Aimeos\MShop\Subscription\Item\Iface Subscription item for chaining method calls |
||
182 | */ |
||
183 | public function setStatus( $status ) |
||
193 | |||
194 | |||
195 | /** |
||
196 | * Returns the item type |
||
197 | * |
||
198 | * @return string Item type, subtypes are separated by slashes |
||
199 | */ |
||
200 | public function getResourceType() |
||
204 | |||
205 | |||
206 | /** |
||
207 | * Sets the item values from the given array. |
||
208 | * |
||
209 | * @param array $list Associative list of item keys and their values |
||
210 | * @return array Associative list of keys and their values that are unknown |
||
211 | */ |
||
212 | public function fromArray( array $list ) |
||
232 | |||
233 | |||
234 | /** |
||
235 | * Returns the item values as associative list. |
||
236 | * |
||
237 | * @param boolean True to return private properties, false for public only |
||
238 | * @return array Associative list of item properties and their values |
||
239 | */ |
||
240 | public function toArray( $private = false ) |
||
252 | } |
||
253 |