@@ -18,6 +18,9 @@ discard block |
||
18 | 18 | } |
19 | 19 | } |
20 | 20 | |
21 | + /** |
|
22 | + * @param string $fieldName |
|
23 | + */ |
|
21 | 24 | protected function getField($fieldName) |
22 | 25 | { |
23 | 26 | if(!is_object($this->ldapObj)) |
@@ -27,6 +30,9 @@ discard block |
||
27 | 30 | return $this->getFieldServer($fieldName); |
28 | 31 | } |
29 | 32 | |
33 | + /** |
|
34 | + * @param string $fieldName |
|
35 | + */ |
|
30 | 36 | protected function getFieldSingleValue($fieldName) |
31 | 37 | { |
32 | 38 | if(!is_object($this->ldapObj)) |
@@ -36,6 +42,9 @@ discard block |
||
36 | 42 | return $this->getFieldServerSingleValue($fieldName); |
37 | 43 | } |
38 | 44 | |
45 | + /** |
|
46 | + * @param string $fieldName |
|
47 | + */ |
|
39 | 48 | protected function setField($fieldName, $fieldValue) |
40 | 49 | { |
41 | 50 | if(!is_object($this->ldapObj)) |
@@ -45,6 +54,9 @@ discard block |
||
45 | 54 | return $this->setFieldServer($fieldName, $fieldValue); |
46 | 55 | } |
47 | 56 | |
57 | + /** |
|
58 | + * @param string $fieldName |
|
59 | + */ |
|
48 | 60 | protected function appendField($fieldName, $fieldValue) |
49 | 61 | { |
50 | 62 | if(!is_object($this->ldapObj)) |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * |
36 | 36 | * @param string $name The name of the group to check if the user is in |
37 | 37 | * |
38 | - * @return true|false True if the user is in the group, false otherwise |
|
38 | + * @return boolean True if the user is in the group, false otherwise |
|
39 | 39 | */ |
40 | 40 | public function isInGroupNamed($name) |
41 | 41 | { |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * We need the ability to obtain the user's unhashed plain text password to allow for it to be sent |
91 | 91 | * to the correct backend which will hash it |
92 | 92 | * |
93 | - * @return string The current password |
|
93 | + * @return boolean The current password |
|
94 | 94 | */ |
95 | 95 | public function getPassword() |
96 | 96 | { |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | * |
136 | 136 | * @param string $email The user's new email address |
137 | 137 | * |
138 | - * @return true|false true if the user's email address was changed, false otherwise |
|
138 | + * @return boolean true if the user's email address was changed, false otherwise |
|
139 | 139 | */ |
140 | 140 | public function setEmail($email) |
141 | 141 | { |
@@ -146,9 +146,8 @@ discard block |
||
146 | 146 | /** |
147 | 147 | * Set the user's given (first) name |
148 | 148 | * |
149 | - * @param string $name The user's new given name |
|
150 | 149 | * |
151 | - * @return true|false true if the user's given name was changed, false otherwise |
|
150 | + * @return boolean true if the user's given name was changed, false otherwise |
|
152 | 151 | */ |
153 | 152 | public function setGivenName($givenName) |
154 | 153 | { |
@@ -161,7 +160,7 @@ discard block |
||
161 | 160 | * |
162 | 161 | * @param string $sn The user's new last name |
163 | 162 | * |
164 | - * @return true|false true if the user's last name was changed, false otherwise |
|
163 | + * @return boolean true if the user's last name was changed, false otherwise |
|
165 | 164 | */ |
166 | 165 | public function setLastName($sn) |
167 | 166 | { |
@@ -138,6 +138,9 @@ discard block |
||
138 | 138 | return $dataTable; |
139 | 139 | } |
140 | 140 | |
141 | + /** |
|
142 | + * @return boolean |
|
143 | + */ |
|
141 | 144 | private function getPendingUserDataTable() |
142 | 145 | { |
143 | 146 | if(isset($this->params['pending_user_table'])) |
@@ -208,6 +211,14 @@ discard block |
||
208 | 211 | return $dataTable->read($filter, $select, $top, $skip, $orderby); |
209 | 212 | } |
210 | 213 | |
214 | + /** |
|
215 | + * @param string $dataTableName |
|
216 | + * @param string $className |
|
217 | + * @param boolean $select |
|
218 | + * @param boolean $top |
|
219 | + * @param boolean $skip |
|
220 | + * @param boolean $orderby |
|
221 | + */ |
|
211 | 222 | private function convertDataToClass($dataTableName, $className, $filter, $select, $top, $skip, $orderby) |
212 | 223 | { |
213 | 224 | $data = $this->getDataByFilter($dataTableName, $filter, $select, $top, $skip, $orderby); |
@@ -241,6 +252,12 @@ discard block |
||
241 | 252 | return $dataTable->count(); |
242 | 253 | } |
243 | 254 | |
255 | + /** |
|
256 | + * @param boolean $select |
|
257 | + * @param boolean $top |
|
258 | + * @param boolean $skip |
|
259 | + * @param boolean $orderby |
|
260 | + */ |
|
244 | 261 | private function searchPendingUsers($filter, $select, $top, $skip, $orderby) |
245 | 262 | { |
246 | 263 | $userDataTable = $this->getPendingUserDataTable(); |
@@ -272,6 +289,9 @@ discard block |
||
272 | 289 | return $ret; |
273 | 290 | } |
274 | 291 | |
292 | + /** |
|
293 | + * @param \Data\Filter $filter |
|
294 | + */ |
|
275 | 295 | public function getPendingUsersByFilter($filter, $select=false, $top=false, $skip=false, $orderby=false) |
276 | 296 | |
277 | 297 | { |
@@ -109,7 +109,7 @@ |
||
109 | 109 | * @param $params The set of parameters obtained from the authentication call |
110 | 110 | * @param $current_user The user from the current system if the user is not authorized to login via this method |
111 | 111 | * |
112 | - * @return SUCCESS|LOGIN_FAILED|ALREADY_PRESENT SUCCESS if the user is now logged in. ALREADY_PRESENT if the authorization was |
|
112 | + * @return integer SUCCESS if the user is now logged in. ALREADY_PRESENT if the authorization was |
|
113 | 113 | * successful, but the user has not authorized that login method. LOGIN_FAILED for all other errors |
114 | 114 | */ |
115 | 115 | public function authenticate($params, &$current_user) |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @param string $methodName The class name of the Authenticator to get the instance for |
55 | 55 | * |
56 | - * @return Auth\Authenticator|false The specified Authenticator class instance or false if it is not loaded |
|
56 | + * @return string The specified Authenticator class instance or false if it is not loaded |
|
57 | 57 | */ |
58 | 58 | public function getAuthenticator($methodName) |
59 | 59 | { |
@@ -269,11 +269,11 @@ discard block |
||
269 | 269 | * Get an array of Auth\PendingUser from a filtered set |
270 | 270 | * |
271 | 271 | * @param Data\Filter|false $filter The filter conditions or false to retreive all |
272 | - * @param array|false $methodName The user fields to obtain or false to obtain all |
|
273 | - * @param integer|false $top The number of users to obtain or false to obtain all |
|
274 | - * @param integer|false $skip The number of users to skip or false to skip none |
|
275 | - * @param array|false $orderby The field to sort by and the method to sort or false to not sort |
|
276 | - * @param string|false $methodName The AuthMethod if information is desired only from a particular Auth\Authenticator |
|
272 | + * @param boolean $methodName The user fields to obtain or false to obtain all |
|
273 | + * @param boolean $top The number of users to obtain or false to obtain all |
|
274 | + * @param boolean $skip The number of users to skip or false to skip none |
|
275 | + * @param boolean $orderby The field to sort by and the method to sort or false to not sort |
|
276 | + * @param boolean $methodName The AuthMethod if information is desired only from a particular Auth\Authenticator |
|
277 | 277 | * |
278 | 278 | * @return array|false An array of Auth\PendingUser objects or false if no pending users were found |
279 | 279 | */ |
@@ -20,6 +20,9 @@ |
||
20 | 20 | $this->addWellKnownJS(JS_METISMENU, false); |
21 | 21 | } |
22 | 22 | |
23 | + /** |
|
24 | + * @param string $adminGroup |
|
25 | + */ |
|
23 | 26 | protected function userIsAdmin($adminGroup) |
24 | 27 | { |
25 | 28 | if($this->user === false || $this->user === null) |
@@ -487,7 +487,6 @@ discard block |
||
487 | 487 | /** |
488 | 488 | * Add a Cascading Style Sheet file from its src URI |
489 | 489 | * |
490 | - * @param string $src The webpath to the Cascading Style Sheet file |
|
491 | 490 | * @param boolean $async Can the CSS be loaded asynchronously? |
492 | 491 | */ |
493 | 492 | public function addCSSByURI($uri, $async=false) |
@@ -514,6 +513,9 @@ discard block |
||
514 | 513 | $this->addWellKnownJS($type, $async); |
515 | 514 | } |
516 | 515 | |
516 | + /** |
|
517 | + * @param integer $type |
|
518 | + */ |
|
517 | 519 | function add_js($type, $async=true) |
518 | 520 | { |
519 | 521 | $this->addWellKnownJS($type, $async); |
@@ -582,6 +584,9 @@ discard block |
||
582 | 584 | return $ret; |
583 | 585 | } |
584 | 586 | |
587 | + /** |
|
588 | + * @return string |
|
589 | + */ |
|
585 | 590 | protected function getHrefForDropdown(&$link) |
586 | 591 | { |
587 | 592 | if(isset($link['_'])) |
@@ -685,7 +690,7 @@ discard block |
||
685 | 690 | * |
686 | 691 | * @param string $msg The message to show in the notifcation |
687 | 692 | * @param string $sev The severity of the notifcation |
688 | - * @param boolean $dismissible Can the user dismiss the notificaton? |
|
693 | + * @param integer $dismissible Can the user dismiss the notificaton? |
|
689 | 694 | * |
690 | 695 | * @deprecated 2.0.0 Use the addNotification function instead |
691 | 696 | */ |
@@ -699,7 +704,7 @@ discard block |
||
699 | 704 | * Add a notification to the page |
700 | 705 | * |
701 | 706 | * @param string $message The message to show in the notifcation |
702 | - * @param string $sevity The severity of the notifcation |
|
707 | + * @param string $severity The severity of the notifcation |
|
703 | 708 | * @param boolean $dismissible Can the user dismiss the notificaton? |
704 | 709 | * |
705 | 710 | * @deprecated 2.0.0 Use the addNotification function instead |
@@ -793,7 +798,6 @@ discard block |
||
793 | 798 | * Draw the page |
794 | 799 | * |
795 | 800 | * @param boolean $header Draw the header |
796 | - * @param boolean $analytics Include analytics on the page |
|
797 | 801 | */ |
798 | 802 | public function printPage($header=true) |
799 | 803 | { |
@@ -812,7 +816,7 @@ discard block |
||
812 | 816 | * |
813 | 817 | * @param string $name The name of the link |
814 | 818 | * @param false|string $url The URL to link to |
815 | - * @param false|array $subment Any submenu items for the dropdown |
|
819 | + * @param false|array $submenu Any submenu items for the dropdown |
|
816 | 820 | * |
817 | 821 | * @deprecated 1.0.0 Use addLink instead |
818 | 822 | */ |
@@ -826,7 +830,7 @@ discard block |
||
826 | 830 | * |
827 | 831 | * @param string $name The name of the link |
828 | 832 | * @param false|string $url The URL to link to |
829 | - * @param false|array $subment Any submenu items for the dropdown |
|
833 | + * @param false|array $submenu Any submenu items for the dropdown |
|
830 | 834 | */ |
831 | 835 | public function addLink($name, $url=false, $submenu=false) |
832 | 836 | { |
@@ -12,11 +12,17 @@ |
||
12 | 12 | if($string !== false) $this->process_filter_string($string); |
13 | 13 | } |
14 | 14 | |
15 | + /** |
|
16 | + * @param string $needle |
|
17 | + */ |
|
15 | 18 | static function str_startswith($haystack, $needle) |
16 | 19 | { |
17 | 20 | return substr($haystack, 0, strlen($needle)) === $needle; |
18 | 21 | } |
19 | 22 | |
23 | + /** |
|
24 | + * @param boolean $string |
|
25 | + */ |
|
20 | 26 | protected function process_filter_string($string) |
21 | 27 | { |
22 | 28 | if(self::str_startswith($string, 'substringof') || self::str_startswith($string, 'contains') || |
@@ -17,6 +17,9 @@ |
||
17 | 17 | } |
18 | 18 | } |
19 | 19 | |
20 | + /** |
|
21 | + * @param string $sql |
|
22 | + */ |
|
20 | 23 | function _get_row_count_for_query($sql) |
21 | 24 | { |
22 | 25 | $stmt = $this->pdo->query($sql); |