1 | <?php |
||
29 | class Checks |
||
30 | { |
||
31 | /** |
||
32 | * Plugin that will be used |
||
33 | **/ |
||
34 | private $_plugin = ''; |
||
35 | |||
36 | /** |
||
37 | * Local path |
||
38 | **/ |
||
39 | private $_path = ''; |
||
40 | |||
41 | /** |
||
42 | * File that will be used |
||
43 | **/ |
||
44 | private $_file = ''; |
||
45 | |||
46 | /** |
||
47 | * Remember positive existance checks |
||
48 | **/ |
||
49 | private $_existance = false; |
||
50 | |||
51 | /** |
||
52 | * Get plugin to see if it exists |
||
53 | * |
||
54 | * @param string $plugin Name of plugin |
||
55 | * |
||
56 | * @return \csphere\core\plugins\Checks |
||
57 | **/ |
||
58 | |||
59 | public function __construct($plugin) |
||
68 | |||
69 | /** |
||
70 | * Check if plugin is valid |
||
71 | * |
||
72 | * @throws \Exception |
||
73 | * |
||
74 | * @return void |
||
75 | **/ |
||
76 | |||
77 | private function _validate() |
||
90 | |||
91 | /** |
||
92 | * Checks if the target file exists |
||
93 | * |
||
94 | * @throws \Exception |
||
95 | * |
||
96 | * @return boolean |
||
97 | **/ |
||
98 | |||
99 | public function existance() |
||
125 | |||
126 | /** |
||
127 | * Set target for requests |
||
128 | * |
||
129 | * @param string $target Name of target |
||
130 | * |
||
131 | * @throws \Exception |
||
132 | * |
||
133 | * @return void |
||
134 | **/ |
||
135 | |||
136 | public function setRoute($target) |
||
151 | |||
152 | /** |
||
153 | * Set target for template files |
||
154 | * |
||
155 | * @param string $target Name of target |
||
156 | * |
||
157 | * @return void |
||
158 | **/ |
||
159 | |||
160 | public function setTemplate($target) |
||
170 | |||
171 | /** |
||
172 | * Replies with the target file |
||
173 | * |
||
174 | * @param boolean $path Append local path which defaults to true |
||
175 | * |
||
176 | * @throws \Exception |
||
177 | * |
||
178 | * @return string |
||
179 | **/ |
||
180 | |||
181 | public function result($path = true) |
||
196 | } |
||
197 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.