1 <?php
2
3 /* --------------------------------------------------------------
4 ProductInterface.inc.php 2016-01-18
5 Gambio GmbH
6 http://www.gambio.de
7 Copyright (c) 2016 Gambio GmbH
8 Released under the GNU General Public License (Version 2)
9 [http://www.gnu.org/licenses/gpl-2.0.html]
10 --------------------------------------------------------------
11 */
12
13 /**
14 * Interface ProductInterface
15 *
16 * @category System
17 * @package Product
18 * @subpackage Interfaces
19 */
20 interface ProductInterface
21 {
22 /**
23 * Is Active
24 *
25 * Checks if a product is active.
26 *
27 * @return bool
28 */
29 public function isActive();
30
31
32 /**
33 * Get Sort Order
34 *
35 * Returns an integer which represents a specific sort order.
36 *
37 * @return int The sort order.
38 */
39 public function getSortOrder();
40
41
42 /**
43 * Get Available Date Time
44 *
45 * Returns the available date time of the product.
46 *
47 * @return DateTime The available date time.
48 */
49 public function getAvailableDateTime();
50
51
52 /**
53 * Get Added Date Time
54 *
55 * Returns the added date time of the product.
56 *
57 * @return DateTime The added date time.
58 */
59 public function getAddedDateTime();
60
61
62 /**
63 * Get Last Modified Date Time
64 *
65 * Returns the last modified date time.
66 *
67 * @return DateTime The last modified date time.
68 */
69 public function getLastModifiedDateTime();
70
71
72 /**
73 * Get View Count
74 *
75 * Returns the current view count of the product, depending on the provided language code.
76 *
77 * @throws InvalidArgumentException
78 *
79 * @param LanguageCode $language The language code of the language to be returned.
80 *
81 * @return int The current view count.
82 */
83 public function getViewedCount(LanguageCode $language);
84
85
86 /**
87 * Get Ordered Count
88 *
89 * Returns the ordered count of the product.
90 *
91 * @return int The ordered count.
92 */
93 public function getOrderedCount();
94
95
96 /**
97 * Get Product Settings.
98 *
99 * Returns the product settings.
100 *
101 * @return ProductSettingsInterface
102 */
103 public function getSettings();
104
105
106 /**
107 * Get Name
108 *
109 * Returns the name of the product, depending on the provided language code.
110 *
111 * @param LanguageCode $language The language code of the language to return.
112 *
113 * @return string The name of the product.
114 */
115 public function getName(LanguageCode $language);
116
117
118 /**
119 * Get Description
120 *
121 * Returns the description of the product, depending on the provided language code.
122 *
123 * @param LanguageCode $language The language code of the language to return.
124 *
125 * @return string The description of the product.
126 */
127 public function getDescription(LanguageCode $language);
128
129
130 /**
131 * Get Short Description
132 *
133 * Returns the short description of the product, depending on the provided language code.
134 *
135 * @param LanguageCode $language The language code of the language to return.
136 *
137 * @return string The short description of the product.
138 */
139 public function getShortDescription(LanguageCode $language);
140
141
142 /**
143 * Get Keywords
144 *
145 * Returns the keywords of the product, depending on the provided language code.
146 *
147 * @param LanguageCode $language The language code of the language to return.
148 *
149 * @return string The keywords of the product.
150 */
151 public function getKeywords(LanguageCode $language);
152
153
154 /**
155 * Get Meta Title
156 *
157 * Returns the meta title of the product, depending on the provided language code.
158 *
159 * @param LanguageCode $language The language code of the language to return.
160 *
161 * @return string The meta title of the product.
162 */
163 public function getMetaTitle(LanguageCode $language);
164
165
166 /**
167 * Get Meta Description
168 *
169 * Returns the meta description of the product, depending on the provided language code.
170 *
171 * @param LanguageCode $language The language code of the language to return.
172 *
173 * @return string The meta description of the product.
174 */
175 public function getMetaDescription(LanguageCode $language);
176
177
178 /**
179 * Get Meta Keywords
180 *
181 * Returns the meta keywords of the product, depending on the provided language code.
182 *
183 * @param LanguageCode $language The language code of the language to return.
184 *
185 * @return string The meta keywords of the product.
186 */
187 public function getMetaKeywords(LanguageCode $language);
188
189
190 /**
191 * Get Url
192 *
193 * Returns the URL of the product, depending on the provided language code.
194 *
195 * @throws InvalidArgumentException
196 *
197 * @param LanguageCode $language The language code of the language to return.
198 *
199 * @return string Product URL
200 */
201 public function getUrl(LanguageCode $language);
202
203
204 /**
205 * Get URL Keywords
206 *
207 * Returns the URL keywords of the product, depending on the provided language code.
208 *
209 * @param LanguageCode $language The language code of the language to return.
210 *
211 * @return string The URL keywords of the product.
212 */
213 public function getUrlKeywords(LanguageCode $language);
214
215
216 /**
217 * Get Checkout Information
218 *
219 * Returns the checkout information of the product, depending on the provided language code.
220 *
221 * @param LanguageCode $language The language code of the language to return.
222 *
223 * @return string The checkout information of the product.
224 */
225 public function getCheckoutInformation(LanguageCode $language);
226
227
228 /**
229 * Get Product Model
230 *
231 * Returns the product model.
232 *
233 * @return string The product model.
234 */
235 public function getProductModel();
236
237
238 /**
239 * Get EAN
240 *
241 * Returns the EAN of the product.
242 *
243 * @return string The EAN of the product.
244 */
245 public function getEan();
246
247
248 /**
249 * Get Price
250 *
251 * Returns the price of a product.
252 *
253 * @return float The price of the product.
254 */
255 public function getPrice();
256
257
258 /**
259 * Get Tax Class ID
260 *
261 * Returns the tax class ID of the product.
262 *
263 * @return int The tax class ID.
264 */
265 public function getTaxClassId();
266
267
268 /**
269 * Get Quantity
270 *
271 * Returns the quantity of the product.
272 *
273 * @return float The quantity of the product.
274 */
275 public function getQuantity();
276
277
278 /**
279 * Get Weight
280 *
281 * Returns the weight of the product.
282 *
283 * @return float The weight of the product.
284 */
285 public function getWeight();
286
287
288 /**
289 * Get Discount Allowed
290 *
291 * Returns the allowed discount.
292 *
293 * @return float The allowed discount.
294 */
295 public function getDiscountAllowed();
296
297
298 /**
299 * Get Shipping Costs
300 *
301 * Returns the shipping cost of the product.
302 *
303 * @return float The shipping costs of the product.
304 */
305 public function getShippingCosts();
306
307
308 /**
309 * Get Shipping Time ID
310 *
311 * Returns the shipping time ID of the product.
312 *
313 * @return int The shipping time ID.
314 */
315 public function getShippingTimeId();
316
317
318 /**
319 * Get Product Type ID.
320 *
321 * Returns the product type ID.
322 *
323 * @return int The product type ID.
324 */
325 public function getProductTypeId();
326
327
328 /**
329 * Get Manufacturer ID
330 *
331 * Returns the manufacturer ID.
332 *
333 * @return int The manufacturer ID.
334 */
335 public function getManufacturerId();
336
337
338 /**
339 * Is FSK 18
340 *
341 * Checks if the product is only available for FSK 18.
342 *
343 * @return bool Is the product FSK18?
344 */
345 public function isFsk18();
346
347
348 /**
349 * Is VPE Active
350 *
351 * Checks if VPE is active on the product.
352 *
353 * @return bool Is VPE active on the product?
354 */
355 public function isVpeActive();
356
357
358 /**
359 * Get VPE ID.
360 *
361 * Returns the VPE ID.
362 *
363 * @return int VPE ID.
364 */
365 public function getVpeId();
366
367
368 /**
369 * Get VPE Value
370 *
371 * Returns the VPE value.
372 *
373 * @return float The VPE value.
374 */
375 public function getVpeValue();
376
377
378 /**
379 * Get Addon Value
380 *
381 * Returns the addon value of a product, depending on the provided key.
382 *
383 * @param StringType $key The key of the addon value to return.
384 *
385 * @return string The addon value.
386 */
387 public function getAddonValue(StringType $key);
388
389
390 /**
391 * Get Addon Values
392 *
393 * Returns a key value collection of the product.
394 *
395 * @return KeyValueCollection The key value collection.
396 */
397 public function getAddonValues();
398
399
400 /**
401 * Set Active
402 *
403 * Activates or deactivates a product status.
404 *
405 * @param BoolType $status Should the product status be activated?
406 *
407 * @return ProductInterface Same instance for chained method calls.
408 */
409 public function setActive(BoolType $status);
410
411
412 /**
413 * Set Sort Order
414 *
415 * Sets the sort order of the product.
416 *
417 * @param IntType $sortOrder The sort order.
418 *
419 * @return ProductInterface Same instance for chained method calls.
420 */
421 public function setSortOrder(IntType $sortOrder);
422
423
424 /**
425 * Set Available Date Time
426 *
427 * Sets an available date time.
428 *
429 * @param DateTime $date The date time to add.
430 *
431 * @return ProductInterface Same instance for chained method calls.
432 */
433 public function setAvailableDateTime(DateTime $date);
434
435
436 /**
437 * Set Last Modified Date Time
438 *
439 * Sets the last modified date time.
440 *
441 * @param DateTime $date The last modified date time.
442 *
443 * @return ProductInterface Same instance for chained method calls.
444 */
445 public function setLastModifiedDateTime(DateTime $date);
446
447
448 /**
449 * Set Viewed Count
450 *
451 * Sets the viewed count of a product.
452 *
453 * @param IntType $count The amount of views.
454 * @param LanguageCode $language The language code for the product name.
455 *
456 * @return ProductInterface Same instance for chained method calls.
457 */
458 public function setViewedCount(IntType $count, LanguageCode $language);
459
460
461 /**
462 * Set Ordered Count
463 *
464 * Sets the ordered count.
465 *
466 * @param IntType $count The ordered count.
467 *
468 * @return ProductInterface Same instance for chained method calls.
469 */
470 public function setOrderedCount(IntType $count);
471
472
473 /**
474 * Set Image Container
475 *
476 * Sets the image container of a product.
477 *
478 * @param ProductImageContainerInterface $images Product image container to set.
479 *
480 * @return ProductInterface Same instance for chained method calls.
481 */
482 public function setImageContainer(ProductImageContainerInterface $images);
483
484
485 /**
486 * Sets the settings of the product.
487 *
488 * @param ProductSettingsInterface $productSettings The settings of the product.
489 *
490 * @return ProductInterface Same instance for chained method calls.
491 */
492 public function setSettings(ProductSettingsInterface $productSettings);
493
494
495 /**
496 * Set Name
497 *
498 * Sets the products name.
499 *
500 * @param StringType $text The name of the product.
501 * @param LanguageCode $language The language code for the product name.
502 *
503 * @return ProductInterface Same instance for chained method calls.
504 */
505 public function setName(StringType $text, LanguageCode $language);
506
507
508 /**
509 * Set Description
510 *
511 * Sets the products description.
512 *
513 * @param StringType $text The description.
514 * @param LanguageCode $language The language code for the description.
515 *
516 * @return ProductInterface Same instance for chained method calls.
517 */
518 public function setDescription(StringType $text, LanguageCode $language);
519
520
521 /**
522 * Set Short Description
523 *
524 * Sets the products short description.
525 *
526 * @param StringType $text Short description to set.
527 * @param LanguageCode $language The language code for the short description.
528 *
529 * @return ProductInterface Same instance for chained method calls.
530 */
531 public function setShortDescription(StringType $text, LanguageCode $language);
532
533
534 /**
535 * Set Keywords
536 *
537 * Sets the products keywords.
538 *
539 * @param StringType $text The keywords.
540 * @param LanguageCode $language The language code for the keywords.
541 *
542 * @return ProductInterface Same instance for chained method calls.
543 */
544 public function setKeywords(StringType $text, LanguageCode $language);
545
546
547 /**
548 * Set Meta title.
549 *
550 * Sets the meta title.
551 *
552 * @param StringType $text Meta title to set.
553 * @param LanguageCode $language Language code of the meta title.
554 *
555 * @return ProductInterface Same instance for chained method calls.
556 */
557 public function setMetaTitle(StringType $text, LanguageCode $language);
558
559
560 /**
561 * Set Meta description.
562 *
563 * Sets the products meta description.
564 *
565 * @param StringType $text Meta description to set.
566 * @param LanguageCode $language Language code for the meta description.
567 *
568 * @return ProductInterface Same instance for chained method calls.
569 */
570 public function setMetaDescription(StringType $text, LanguageCode $language);
571
572
573 /**
574 * Set Meta Keywords
575 *
576 * Sets the products meta keywords.
577 *
578 * @param StringType $text The meta keywords.
579 * @param LanguageCode $language The language code for the meta keywords.
580 *
581 * @return ProductInterface Same instance for chained method calls.
582 */
583 public function setMetaKeywords(StringType $text, LanguageCode $language);
584
585
586 /**
587 * Set URL
588 *
589 * Sets the products URL.
590 *
591 * @param StringType $url The URL to set.
592 * @param LanguageCode $language The language code for the URL keywords.
593 *
594 * @return GXEngineProduct Same instance for chained method calls.
595 */
596 public function setUrl(StringType $url, LanguageCode $language);
597
598
599 /**
600 * Set URL Keywords
601 *
602 * Sets the products URL Keywords.
603 *
604 * @param StringType $text The URL.
605 * @param LanguageCode $language The language code for the URL keywords.
606 *
607 * @return ProductInterface Same instance for chained method calls.
608 */
609 public function setUrlKeywords(StringType $text, LanguageCode $language);
610
611
612 /**
613 * Set Checkout Information
614 *
615 * Sets the checkout information.
616 *
617 * @param StringType $text The checkout information.
618 * @param LanguageCode $language The language code for the checkout information.
619 *
620 * @return ProductInterface Same instance for chained method calls.
621 */
622 public function setCheckoutInformation(StringType $text, LanguageCode $language);
623
624
625 /**
626 * Set Product Model
627 *
628 * Set the product model.
629 *
630 * @param StringType $model The product model.
631 *
632 * @return ProductInterface Same instance for chained method calls.
633 */
634 public function setProductModel(StringType $model);
635
636
637 /**
638 * Set EAN
639 *
640 * Sets a EAN for the product.
641 *
642 * @param StringType $ean The EAN to set.
643 *
644 * @return ProductInterface Same instance for chained method calls.
645 */
646 public function setEan(StringType $ean);
647
648
649 /**
650 * Set Price
651 *
652 * Sets a price of the product.
653 *
654 * @param DecimalType $price The price to set.
655 *
656 * @return ProductInterface Same instance for chained method calls.
657 */
658 public function setPrice(DecimalType $price);
659
660
661 /**
662 * Set Tax Class ID
663 *
664 * Sets a tax class ID for the product.
665 *
666 * @param IdType $id The tax class ID to set.
667 *
668 * @return ProductInterface Same instance for chained method calls.
669 */
670 public function setTaxClassId(IdType $id);
671
672
673 /**
674 * Set Quantity
675 *
676 * Sets a quantity for the product.
677 *
678 * @param DecimalType $quantity The quantity to set.
679 *
680 * @return ProductInterface Same instance for chained method calls.
681 */
682 public function setQuantity(DecimalType $quantity);
683
684
685 /**
686 * Set Weight
687 *
688 * Sets the weight of a product.
689 *
690 * @param DecimalType $weight The weight to set.
691 *
692 * @return ProductInterface Same instance for chained method calls.
693 */
694 public function setWeight(DecimalType $weight);
695
696
697 /**
698 * Set Discount Allowed
699 *
700 * Sets the allowed discount of a product.
701 *
702 * @param DecimalType $discount The discount to set.
703 *
704 * @return ProductInterface Same instance for chained method calls.
705 */
706 public function setDiscountAllowed(DecimalType $discount);
707
708
709 /**
710 * Set Shipping Costs
711 *
712 * Sets the shipping costs of a product.
713 *
714 * @param DecimalType $price The shipping costs to set.
715 *
716 * @return ProductInterface Same instance for chained method calls.
717 */
718 public function setShippingCosts(DecimalType $price);
719
720
721 /**
722 * Set Shipping Time ID
723 *
724 * Sets the shipping time ID of a product.
725 *
726 * @param IdType $id The shipping time ID to set.
727 *
728 * @return ProductInterface Same instance for chained method calls.
729 */
730 public function setShippingTimeId(IdType $id);
731
732
733 /**
734 * Set Product Type ID.
735 *
736 * Sets the product type ID of the product.
737 *
738 * @param IdType $id Product type ID to set.
739 *
740 * @return ProductInterface Same instance for chained method calls.
741 */
742 public function setProductTypeId(IdType $id);
743
744
745 /**
746 * Set Manufacturer ID
747 *
748 * Sets the manufacturer ID of a product.
749 *
750 * @param IdType $id The manufacturer ID to set.
751 *
752 * @return ProductInterface Same instance for chained method calls.
753 */
754 public function setManufacturerId(IdType $id);
755
756
757 /**
758 * Set FSK 18
759 *
760 * Activates or deactivates FSK18 for a product.
761 *
762 * @param BoolType $status Should FSK be activated?
763 *
764 * @return ProductInterface Same instance for chained method calls.
765 */
766 public function setFsk18(BoolType $status);
767
768
769 /**
770 * Set VPE Active
771 *
772 * Activates or deactivates VPE for a product.
773 *
774 * @param BoolType $status Should VPE be activated?
775 *
776 * @return ProductInterface Same instance for chained method calls.
777 */
778 public function setVpeActive(BoolType $status);
779
780
781 /**
782 * Set VPE ID
783 *
784 * Sets the VPE ID of a product.
785 *
786 * @param IdType $id The VPE ID to set.
787 *
788 * @return ProductInterface Same instance for chained method calls.
789 */
790 public function setVpeId(IdType $id);
791
792
793 /**
794 * Set VPE Value
795 *
796 * Sets the VPE value of a product.
797 *
798 * @param DecimalType $vpeValue The VPE value to set.
799 *
800 * @return ProductInterface Same instance for chained method calls.
801 */
802 public function setVpeValue(DecimalType $vpeValue);
803
804
805 /**
806 * Set Addon Value
807 *
808 * Sets the addon value of a product.
809 *
810 * @param StringType $key The key for the addon value.
811 * @param StringType $value The value for the addon.
812 *
813 * @return ProductInterface Same instance for chained method calls.
814 */
815 public function setAddonValue(StringType $key, StringType $value);
816
817
818 /**
819 * Sets the added date time.
820 *
821 * @param DateTime $date Added date time to set.
822 *
823 * @return ProductInterface Same instance for chained method calls.
824 */
825 public function setAddedDateTime(DateTime $date);
826
827
828 /**
829 * Add Addon Values
830 *
831 * Adds a key value collection to a product.
832 *
833 * @param KeyValueCollection $keyValueCollection The key value collection to add.
834 *
835 * @return ProductInterface Same instance for chained method calls.
836 */
837 public function addAddonValues(KeyValueCollection $keyValueCollection);
838
839
840 /**
841 * Delete Addon Value
842 *
843 * Deletes a addon value of a product.
844 *
845 * @param StringType $key The key of the addon value to delete.
846 *
847 * @return ProductInterface Same instance for chained method calls.
848 */
849 public function deleteAddonValue(StringType $key);
850
851
852 /**
853 * Returns the image container of the product.
854 *
855 * @return ProductImageContainer Product image container.
856 */
857 public function getImageContainer();
858
859
860 /**
861 * Returns a product's primary image.
862 *
863 * @return ProductImage
864 */
865 public function getPrimaryImage();
866
867
868 /**
869 * Returns a product's additional images.
870 *
871 * @return ProductImageCollection
872 */
873 public function getAdditionalImages();
874 }