1 | <?php |
||
12 | class ValidContent implements \Anax\DI\IInjectionAware |
||
13 | { |
||
14 | use \Anax\DI\TInjectable; |
||
15 | |||
16 | private $miniLength; // Minimum length on text-fields (ex. ingress, title etc) |
||
17 | private $urlPrefix; |
||
18 | private $filters; |
||
19 | private $types; |
||
20 | |||
21 | /** |
||
22 | * Initialize the controller |
||
23 | * |
||
24 | * @Return Void |
||
25 | */ |
||
26 | 16 | public function initialize(){ |
|
32 | |||
33 | /** |
||
34 | * Create a link to the content, based on its type. |
||
35 | * |
||
36 | * @Param Object $content Content to link to |
||
37 | * @Return String With url for content |
||
38 | */ |
||
39 | 2 | public function getUrlToContent($content) { |
|
48 | |||
49 | /** |
||
50 | * Return array with all content types title and keys (Use for content-type select) |
||
51 | * |
||
52 | * @Return Array $types Array with the types title and keys |
||
53 | */ |
||
54 | 1 | public function getTypes(){ |
|
64 | |||
65 | /** |
||
66 | * Return array with all filters |
||
67 | * |
||
68 | * @Return Array $this->filters Array with the filters |
||
69 | */ |
||
70 | 1 | public function getFilters(){ |
|
73 | |||
74 | /** |
||
75 | * Return name of one specific type |
||
76 | * |
||
77 | * @Params String $type Type key |
||
78 | * @Return String Type title |
||
79 | */ |
||
80 | 1 | public function getTypeTitle($type){ |
|
83 | |||
84 | /** |
||
85 | * Create a slug of a string, to be used as url. |
||
86 | * |
||
87 | * @Param String $str String to format as slug. |
||
88 | * @Return String $str Formatted slug. |
||
89 | */ |
||
90 | 3 | public function slugify($str) { |
|
100 | |||
101 | /** |
||
102 | * Check if content is published |
||
103 | * |
||
104 | * @Param String $datetime When it will be published |
||
105 | * @Return Boolean True/false Validate result |
||
106 | */ |
||
107 | 2 | public function checkIfAvailable($datetime){ |
|
110 | |||
111 | /** |
||
112 | * Check so the choosed type exist. |
||
113 | * |
||
114 | * @Param String $type Choosed type on content |
||
115 | * @Returns Boolean Validate result |
||
116 | */ |
||
117 | 2 | public function checkType($type){ |
|
120 | |||
121 | /** |
||
122 | * Validate posted datetime so it is correct |
||
123 | * |
||
124 | * @Param String $datetime Posted datetime to check |
||
125 | * @Return Boolean True/false Validate status |
||
126 | */ |
||
127 | 2 | public function checkDatetime($datetime){ |
|
135 | |||
136 | /** |
||
137 | * Minimum length |
||
138 | * |
||
139 | * @Param String $value Value from form-element to validate |
||
140 | * @Return Boolean True/false Validate result |
||
141 | */ |
||
142 | 2 | public function minimumLength($value){ |
|
145 | |||
146 | /** |
||
147 | * Validate slug url |
||
148 | * |
||
149 | * @Param String $url Url to validate |
||
150 | * @Return Boolean True/false True if valid otherwish false |
||
151 | */ |
||
152 | 2 | public function validateSlug($url){ |
|
155 | |||
156 | /** |
||
157 | * Check so the select filters exist. |
||
158 | * |
||
159 | * @Param Array $filters Array with select filters |
||
160 | * @Return Boolean $result Return the result of test |
||
161 | */ |
||
162 | 2 | public function checkFilter($filter = null){ |
|
173 | } |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.