@@ -90,7 +90,7 @@ |
||
| 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 boolean|string The current password |
|
| 93 | + * @return boolean The current password |
|
| 94 | 94 | */ |
| 95 | 95 | public function getPassword() |
| 96 | 96 | { |
@@ -253,10 +253,10 @@ |
||
| 253 | 253 | * Get an array of Auth\PendingUser from a filtered set |
| 254 | 254 | * |
| 255 | 255 | * @param Data\Filter|boolean $filter The filter conditions or false to retreive all |
| 256 | - * @param array|boolean $select The user fields to obtain or false to obtain all |
|
| 257 | - * @param integer|boolean $top The number of users to obtain or false to obtain all |
|
| 258 | - * @param integer|boolean $skip The number of users to skip or false to skip none |
|
| 259 | - * @param array|boolean $orderby The field to sort by and the method to sort or false to not sort |
|
| 256 | + * @param boolean $select The user fields to obtain or false to obtain all |
|
| 257 | + * @param boolean $top The number of users to obtain or false to obtain all |
|
| 258 | + * @param boolean $skip The number of users to skip or false to skip none |
|
| 259 | + * @param boolean $orderby The field to sort by and the method to sort or false to not sort |
|
| 260 | 260 | * @param string|boolean $methodName The AuthMethod if information is desired only from a particular Auth\Authenticator |
| 261 | 261 | * |
| 262 | 262 | * @return array|boolean An array of Auth\PendingUser objects or false if no pending users were found |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | public function getUsersByFilter($filter, $select = false, $top = false, $skip = false, $orderby = false, $methodName = false) |
| 168 | 168 | { |
| 169 | 169 | return $this->callFunction($methodName, 'getUsersByFilter', array($filter, $select, $top, $skip, $orderby), |
| 170 | - 'current', false, array($this, 'mergeResult')); |
|
| 170 | + 'current', false, array($this, 'mergeResult')); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | /** |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | public function getPendingUsersByFilter($filter, $select = false, $top = false, $skip = false, $orderby = false, $methodName = false) |
| 186 | 186 | { |
| 187 | 187 | return $this->callFunction($methodName, 'getPendingUsersByFilter', array($filter, $select, $top, $skip, $orderby), |
| 188 | - 'pending', false, array($this, 'mergeResult')); |
|
| 188 | + 'pending', false, array($this, 'mergeResult')); |
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | /** |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | public function getGroupsByFilter($filter, $select = false, $top = false, $skip = false, $orderby = false, $methodName = false) |
| 204 | 204 | { |
| 205 | 205 | return $this->callFunction($methodName, 'getGroupsByFilter', array($filter, $select, $top, $skip, $orderby), |
| 206 | - 'current', false, array($this, 'mergeResult')); |
|
| 206 | + 'current', false, array($this, 'mergeResult')); |
|
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | /** |
@@ -22,6 +22,9 @@ discard block |
||
| 22 | 22 | $this->ldapObj = $this->initializeFromArray($data); |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | + /** |
|
| 26 | + * @param string $dn |
|
| 27 | + */ |
|
| 25 | 28 | private function initializeFromDN($dn) |
| 26 | 29 | { |
| 27 | 30 | $filter = new \Data\Filter("dn eq $dn"); |
@@ -93,7 +96,7 @@ discard block |
||
| 93 | 96 | * |
| 94 | 97 | * @param string $fieldName The name of the field to retrieve |
| 95 | 98 | * |
| 96 | - * @return mixed string the value of the field |
|
| 99 | + * @return string string the value of the field |
|
| 97 | 100 | */ |
| 98 | 101 | protected function getFieldSingleValue($fieldName) |
| 99 | 102 | { |
@@ -6,7 +6,6 @@ discard block |
||
| 6 | 6 | * @author Chris Wright |
| 7 | 7 | * @version 2.0 |
| 8 | 8 | * @param string $subject The subject string |
| 9 | - * @param bool $dn Treat subject as a DN if TRUE |
|
| 10 | 9 | * @param string|array $ignore Set of characters to leave untouched |
| 11 | 10 | * @return string The escaped string |
| 12 | 11 | */ |
@@ -216,7 +215,7 @@ discard block |
||
| 216 | 215 | /** |
| 217 | 216 | * Get the LDAP filter represented by the passed object |
| 218 | 217 | * |
| 219 | - * @param boolean|string|\Data\Filter $filter The fiter to use |
|
| 218 | + * @param boolean $filter The fiter to use |
|
| 220 | 219 | * |
| 221 | 220 | * @return string The filter in LDAP format |
| 222 | 221 | */ |
@@ -164,14 +164,14 @@ |
||
| 164 | 164 | |
| 165 | 165 | private function fixChildArray(&$array, $key, &$entity) |
| 166 | 166 | { |
| 167 | - $count = count($array); |
|
| 168 | - for($i = 0; $i < $count; $i++) |
|
| 169 | - { |
|
| 170 | - if(isset($array[$i])) |
|
| 171 | - { |
|
| 172 | - $entity[$key][$i] = $array[$i]; |
|
| 173 | - } |
|
| 174 | - } |
|
| 167 | + $count = count($array); |
|
| 168 | + for($i = 0; $i < $count; $i++) |
|
| 169 | + { |
|
| 170 | + if(isset($array[$i])) |
|
| 171 | + { |
|
| 172 | + $entity[$key][$i] = $array[$i]; |
|
| 173 | + } |
|
| 174 | + } |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | private function fixObject($object, &$delete = false) |
@@ -28,12 +28,18 @@ discard block |
||
| 28 | 28 | return substr($haystack, 0, strlen($needle)) === $needle; |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | + /** |
|
| 32 | + * @param string $string |
|
| 33 | + */ |
|
| 31 | 34 | protected function filterIsFunction($string) |
| 32 | 35 | { |
| 33 | 36 | return (self::str_startswith($string, 'substringof') || self::str_startswith($string, 'contains') || |
| 34 | 37 | self::str_startswith($string, 'indexof')); |
| 35 | 38 | } |
| 36 | 39 | |
| 40 | + /** |
|
| 41 | + * @param string $op |
|
| 42 | + */ |
|
| 37 | 43 | protected function odataOpToStd($op) |
| 38 | 44 | { |
| 39 | 45 | switch($op) |
@@ -146,6 +152,9 @@ discard block |
||
| 146 | 152 | } |
| 147 | 153 | } |
| 148 | 154 | |
| 155 | + /** |
|
| 156 | + * @param string $op |
|
| 157 | + */ |
|
| 149 | 158 | private function getMongoClauseArray($op, $var2) |
| 150 | 159 | { |
| 151 | 160 | return array($this->opToMongo($op)=>$var2); |
@@ -132,6 +132,10 @@ discard block |
||
| 132 | 132 | return $sql; |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | + /** |
|
| 136 | + * @param false|string $count |
|
| 137 | + * @param false|string $skip |
|
| 138 | + */ |
|
| 135 | 139 | private function getLimitClause($count, $skip) |
| 136 | 140 | { |
| 137 | 141 | if($count === false) |
@@ -193,6 +197,9 @@ discard block |
||
| 193 | 197 | return $ret; |
| 194 | 198 | } |
| 195 | 199 | |
| 200 | + /** |
|
| 201 | + * @param string $tablename |
|
| 202 | + */ |
|
| 196 | 203 | function update($tablename, $where, $data) |
| 197 | 204 | { |
| 198 | 205 | $set = array(); |
@@ -215,6 +222,9 @@ discard block |
||
| 215 | 222 | return true; |
| 216 | 223 | } |
| 217 | 224 | |
| 225 | + /** |
|
| 226 | + * @param string $tablename |
|
| 227 | + */ |
|
| 218 | 228 | function create($tablename, $data) |
| 219 | 229 | { |
| 220 | 230 | $set = array(); |
@@ -238,6 +248,9 @@ discard block |
||
| 238 | 248 | return true; |
| 239 | 249 | } |
| 240 | 250 | |
| 251 | + /** |
|
| 252 | + * @param string $tablename |
|
| 253 | + */ |
|
| 241 | 254 | function delete($tablename, $where) |
| 242 | 255 | { |
| 243 | 256 | $sql = "DELETE FROM $tablename WHERE $where"; |
@@ -169,8 +169,8 @@ |
||
| 169 | 169 | { |
| 170 | 170 | if(in_array($propName, $this->multiValueProps) && !is_array($value)) |
| 171 | 171 | { |
| 172 | - $this->setField($propName, array($value)); |
|
| 173 | - return true; |
|
| 172 | + $this->setField($propName, array($value)); |
|
| 173 | + return true; |
|
| 174 | 174 | } |
| 175 | 175 | return false; |
| 176 | 176 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | /** |
| 141 | 141 | * Return an instance to the \LDAP\LDAPServer object instance |
| 142 | 142 | * |
| 143 | - * @param boolean $bind_write Should we be able to write to the server? |
|
| 143 | + * @param boolean $bindWrite Should we be able to write to the server? |
|
| 144 | 144 | * |
| 145 | 145 | * @return \LDAP\LDAPServer|false The server instance if the binding was successful, otherwise false |
| 146 | 146 | * |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | * |
| 220 | 220 | * @param \stdClass $data The AuthData from the session |
| 221 | 221 | * |
| 222 | - * @return null|\Auth\LDAPUser The LDAPUser represented by this data |
|
| 222 | + * @return LDAPUser The LDAPUser represented by this data |
|
| 223 | 223 | */ |
| 224 | 224 | public function getUser($data) |
| 225 | 225 | { |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | |
| 317 | 317 | |
| 318 | 318 | /** |
| 319 | - * @param boolean|\Data\Filter $filter The filter to user when reading users |
|
| 319 | + * @param \Data\Filter $filter The filter to user when reading users |
|
| 320 | 320 | * @param boolean|array $select The fields to return |
| 321 | 321 | * @param boolean|integer $top The number of records to return |
| 322 | 322 | * @param boolean|integer $skip The number of records to skip |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | /** |
| 141 | 141 | * Get the data table for Pending Users |
| 142 | 142 | * |
| 143 | - * @return boolean|\Data\DataTable The Pending User Data Table |
|
| 143 | + * @return boolean The Pending User Data Table |
|
| 144 | 144 | */ |
| 145 | 145 | private function getPendingUserDataTable() |
| 146 | 146 | { |
@@ -189,6 +189,10 @@ discard block |
||
| 189 | 189 | return new SQLUser($data, $this); |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | + /** |
|
| 193 | + * @param string $tableName |
|
| 194 | + * @param string $className |
|
| 195 | + */ |
|
| 192 | 196 | private function getEntityByFilter($tableName, $filterStr, $className) |
| 193 | 197 | { |
| 194 | 198 | $dataTable = $this->getDataTable($tableName); |
@@ -211,6 +215,9 @@ discard block |
||
| 211 | 215 | return $this->getEntityByFilter('user', "uid eq '$name'", 'SQLUser'); |
| 212 | 216 | } |
| 213 | 217 | |
| 218 | + /** |
|
| 219 | + * @param string $dataTableName |
|
| 220 | + */ |
|
| 214 | 221 | private function getDataByFilter($dataTableName, $filter, $select, $top, $skip, $orderby) |
| 215 | 222 | { |
| 216 | 223 | $dataTable = $this->getDataTable($dataTableName); |
@@ -276,6 +283,9 @@ discard block |
||
| 276 | 283 | return $dataTable->count(); |
| 277 | 284 | } |
| 278 | 285 | |
| 286 | + /** |
|
| 287 | + * @param \Data\Filter $filter |
|
| 288 | + */ |
|
| 279 | 289 | private function searchPendingUsers($filter, $select, $top, $skip, $orderby) |
| 280 | 290 | { |
| 281 | 291 | $userDataTable = $this->getPendingUserDataTable(); |