1 | <?php |
||
12 | class CustomColumn extends Base |
||
|
|||
13 | { |
||
14 | /* @var string|integer the ID of the value */ |
||
15 | public $valueID; |
||
16 | /* @var string the (string) representation of the value */ |
||
17 | public $value; |
||
18 | /* @var CustomColumnType the custom column that contains the value */ |
||
19 | public $customColumnType; |
||
20 | /* @var string the value encoded for HTML displaying */ |
||
21 | public $htmlvalue; |
||
22 | |||
23 | /** |
||
24 | * CustomColumn constructor. |
||
25 | * |
||
26 | * @param integer $pid id of the chosen value |
||
27 | * @param string $pvalue string representation of the value |
||
28 | * @param CustomColumnType $pcustomColumnType the CustomColumn this value lives in |
||
29 | */ |
||
30 | 7 | public function __construct($pid, $pvalue, $pcustomColumnType) |
|
37 | |||
38 | /** |
||
39 | * Get the URI to show all books with this value |
||
40 | * |
||
41 | * @return string |
||
42 | */ |
||
43 | public function getUri() |
||
47 | |||
48 | /** |
||
49 | * Get the EntryID to show all books with this value |
||
50 | * |
||
51 | * @return string |
||
52 | */ |
||
53 | 4 | public function getEntryId() |
|
57 | |||
58 | /** |
||
59 | * Get the query to find all books with this value |
||
60 | * the returning array has two values: |
||
61 | * - first the query (string) |
||
62 | * - second an array of all PreparedStatement parameters |
||
63 | * |
||
64 | * @return array |
||
65 | */ |
||
66 | 6 | public function getQuery() |
|
70 | |||
71 | /** |
||
72 | * Return the value of this column as an HTML snippet |
||
73 | * |
||
74 | * @return string |
||
75 | */ |
||
76 | public function getHTMLEncodedValue() |
||
80 | |||
81 | /** |
||
82 | * Create an CustomColumn by CustomColumnID and ValueID |
||
83 | * |
||
84 | * @param integer $customId the id of the customColumn |
||
85 | * @param integer $id the id of the chosen value |
||
86 | * @return CustomColumn|null |
||
87 | */ |
||
88 | 4 | public static function createCustom($customId, $id) |
|
94 | |||
95 | /** |
||
96 | * Return this object as an array |
||
97 | * |
||
98 | * @return array |
||
99 | */ |
||
100 | 1 | public function toArray() |
|
109 | } |
||
110 |
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.