1 | <?php |
||
6 | class DMSRequestItem extends ViewableData |
||
|
|||
7 | { |
||
8 | /** |
||
9 | * The number of copies required of @itemID |
||
10 | * |
||
11 | * @var int |
||
12 | */ |
||
13 | private $quantity; |
||
14 | |||
15 | /** |
||
16 | * The linked {@link DMSDocument} which was added to the cart. |
||
17 | * |
||
18 | * @var DMSDocument |
||
19 | */ |
||
20 | private $document; |
||
21 | |||
22 | /** |
||
23 | * If a document is provided on construction, set it to this item instance |
||
24 | * |
||
25 | * @param DMSDocument $document |
||
26 | */ |
||
27 | public function __construct($document = null) |
||
34 | |||
35 | /** |
||
36 | * Returns the ID of the $this->document |
||
37 | * |
||
38 | * @return int |
||
39 | */ |
||
40 | public function getItemId() |
||
44 | |||
45 | /** |
||
46 | * Returns the linked item Quantity |
||
47 | * |
||
48 | * @return int |
||
49 | */ |
||
50 | public function getQuantity() |
||
54 | |||
55 | /** |
||
56 | * Sets the quantity of documents to be ordered. |
||
57 | * |
||
58 | * @param int $quantity |
||
59 | * |
||
60 | * @return DMSRequestItem |
||
61 | */ |
||
62 | public function setQuantity($quantity) |
||
68 | |||
69 | /** |
||
70 | * Returns the linked DMSDocument |
||
71 | * |
||
72 | * @return DMSDocument |
||
73 | */ |
||
74 | public function getDocument() |
||
80 | |||
81 | /** |
||
82 | * @param DMSDocument $document |
||
83 | * |
||
84 | * @return DMSRequestItem |
||
85 | */ |
||
86 | public function setDocument($document) |
||
92 | } |
||
93 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.