1 | <?php |
||
24 | class Package extends BaseContent implements PackageInterface, PersistableInterface |
||
25 | { |
||
26 | use TimestampableTrait, SoftDeletableTrait, EnableableTrait; |
||
27 | |||
28 | /** |
||
29 | * @var Collection |
||
30 | */ |
||
31 | protected $items; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $body; |
||
37 | |||
38 | /** |
||
39 | * Package constructor. |
||
40 | */ |
||
41 | public function __construct() |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | 13 | public function getItems() |
|
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | 3 | public function setItems(Collection $items) |
|
58 | { |
||
59 | 3 | $this->items = $items; |
|
60 | 3 | } |
|
61 | |||
62 | /** |
||
63 | * Add item. |
||
64 | * |
||
65 | * @param \SWP\Component\Bridge\Model\Item $item |
||
66 | * |
||
67 | * @return Package |
||
68 | */ |
||
69 | public function addItem(\SWP\Component\Bridge\Model\Item $item) |
||
78 | |||
79 | /** |
||
80 | * Remove item. |
||
81 | * |
||
82 | * @param \SWP\Component\Bridge\Model\Item $item |
||
83 | */ |
||
84 | public function removeItem(\SWP\Component\Bridge\Model\Item $item) |
||
91 | |||
92 | /** |
||
93 | * @return mixed |
||
94 | */ |
||
95 | 13 | public function getBody() |
|
99 | |||
100 | /** |
||
101 | * @param mixed $body |
||
102 | */ |
||
103 | public function setBody($body) |
||
107 | } |
||
108 |