@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | * |
| 234 | 234 | * @param \stdClass $data The AuthData from the session |
| 235 | 235 | * |
| 236 | - * @return null|\Auth\LDAPUser The LDAPUser represented by this data |
|
| 236 | + * @return LDAPUser The LDAPUser represented by this data |
|
| 237 | 237 | */ |
| 238 | 238 | public function getUser($data) |
| 239 | 239 | { |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | * |
| 246 | 246 | * @param string $name The Group's name |
| 247 | 247 | * |
| 248 | - * @return null|\Auth\LDAPGroup The LDAPGroup represented by the name or null if not found |
|
| 248 | + * @return null|LDAPGroup The LDAPGroup represented by the name or null if not found |
|
| 249 | 249 | */ |
| 250 | 250 | public function getGroupByName($name) |
| 251 | 251 | { |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 331 | /** |
| 332 | - * @param boolean|\Data\Filter $filter The filter to user when reading users |
|
| 332 | + * @param \Flipside\Data\Filter $filter The filter to user when reading users |
|
| 333 | 333 | * @param boolean|array $select The fields to return |
| 334 | 334 | * @param boolean|integer $top The number of records to return |
| 335 | 335 | * @param boolean|integer $skip The number of records to skip |
@@ -8,17 +8,17 @@ discard block |
||
| 8 | 8 | * @copyright Copyright (c) 2015, Austin Artistic Reconstruction |
| 9 | 9 | * @license http://www.apache.org/licenses/ Apache 2.0 License |
| 10 | 10 | */ |
| 11 | -spl_autoload_register(function ($class) { |
|
| 11 | +spl_autoload_register(function($class) { |
|
| 12 | 12 | |
| 13 | 13 | // project-specific namespace prefix |
| 14 | 14 | $prefix = 'Flipside\\'; |
| 15 | 15 | |
| 16 | 16 | // base directory for the namespace prefix |
| 17 | - $base_dir = __DIR__ . '/'; |
|
| 17 | + $base_dir = __DIR__.'/'; |
|
| 18 | 18 | |
| 19 | 19 | // does the class use the namespace prefix? |
| 20 | 20 | $len = strlen($prefix); |
| 21 | - if (strncmp($prefix, $class, $len) !== 0) { |
|
| 21 | + if(strncmp($prefix, $class, $len) !== 0) { |
|
| 22 | 22 | // no, move to the next registered autoloader |
| 23 | 23 | return; |
| 24 | 24 | } |
@@ -29,10 +29,10 @@ discard block |
||
| 29 | 29 | // replace the namespace prefix with the base directory, replace namespace |
| 30 | 30 | // separators with directory separators in the relative class name, append |
| 31 | 31 | // with .php |
| 32 | - $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php'; |
|
| 32 | + $file = $base_dir.str_replace('\\', '/', $relative_class).'.php'; |
|
| 33 | 33 | |
| 34 | 34 | // if the file exists, require it |
| 35 | - if (file_exists($file)) { |
|
| 35 | + if(file_exists($file)) { |
|
| 36 | 36 | require $file; |
| 37 | 37 | } |
| 38 | 38 | }); |
@@ -8,7 +8,8 @@ discard block |
||
| 8 | 8 | * @copyright Copyright (c) 2015, Austin Artistic Reconstruction |
| 9 | 9 | * @license http://www.apache.org/licenses/ Apache 2.0 License |
| 10 | 10 | */ |
| 11 | -spl_autoload_register(function ($class) { |
|
| 11 | +spl_autoload_register(function ($class) |
|
| 12 | +{ |
|
| 12 | 13 | |
| 13 | 14 | // project-specific namespace prefix |
| 14 | 15 | $prefix = 'Flipside\\'; |
@@ -18,7 +19,8 @@ discard block |
||
| 18 | 19 | |
| 19 | 20 | // does the class use the namespace prefix? |
| 20 | 21 | $len = strlen($prefix); |
| 21 | - if (strncmp($prefix, $class, $len) !== 0) { |
|
| 22 | + if (strncmp($prefix, $class, $len) !== 0) |
|
| 23 | + { |
|
| 22 | 24 | // no, move to the next registered autoloader |
| 23 | 25 | return; |
| 24 | 26 | } |
@@ -32,7 +34,8 @@ discard block |
||
| 32 | 34 | $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php'; |
| 33 | 35 | |
| 34 | 36 | // if the file exists, require it |
| 35 | - if (file_exists($file)) { |
|
| 37 | + if (file_exists($file)) |
|
| 38 | + { |
|
| 36 | 39 | require $file; |
| 37 | 40 | } |
| 38 | 41 | }); |
@@ -15,12 +15,12 @@ |
||
| 15 | 15 | |
| 16 | 16 | public function open($savePath, $sessionName) |
| 17 | 17 | { |
| 18 | - $this->dataTable = \Flipside\DataSetFactory::getDataTableByNames($this->dataSetName, $this->dataTableName); |
|
| 19 | - if($this->dataTable) |
|
| 20 | - { |
|
| 21 | - return true; |
|
| 22 | - } |
|
| 23 | - return false; |
|
| 18 | + $this->dataTable = \Flipside\DataSetFactory::getDataTableByNames($this->dataSetName, $this->dataTableName); |
|
| 19 | + if($this->dataTable) |
|
| 20 | + { |
|
| 21 | + return true; |
|
| 22 | + } |
|
| 23 | + return false; |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | public function close() |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | |
| 63 | 63 | public function gc($maxlifetime) |
| 64 | 64 | { |
| 65 | - $date = date("Y-m-d H:i:s", time()-$maxlifetime); |
|
| 65 | + $date = date("Y-m-d H:i:s", time() - $maxlifetime); |
|
| 66 | 66 | $filter = new \Flipside\Data\Filter("sessionLastAccess lt $date"); |
| 67 | 67 | return $this->dataTable->delete($filter); |
| 68 | 68 | } |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | $settings = array("settings"=>["determineRouteBeforeAppMiddleware"=>true]); |
| 14 | 14 | parent::__construct($settings); |
| 15 | 15 | $c = $this->getContainer(); |
| 16 | - $c['errorHandler'] = function($c) { return new WebErrorHandler();}; |
|
| 16 | + $c['errorHandler'] = function($c) { return new WebErrorHandler(); }; |
|
| 17 | 17 | $this->add(new AuthMiddleware()); |
| 18 | 18 | $this->add(new ODataMiddleware()); |
| 19 | 19 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | public function registerAPI($uri, $api) |
| 27 | 27 | { |
| 28 | - $group = $this->group($uri, function() use($api){$api->setup($this);}); |
|
| 28 | + $group = $this->group($uri, function() use($api){$api->setup($this); }); |
|
| 29 | 29 | $group->add(new \Flipside\Http\Rest\SerializationMiddleware()); |
| 30 | 30 | $group->add(new \Flipside\Http\Rest\CORSMiddleware($this->getContainer())); |
| 31 | 31 | } |
@@ -13,7 +13,9 @@ discard block |
||
| 13 | 13 | $settings = array("settings"=>["determineRouteBeforeAppMiddleware"=>true]); |
| 14 | 14 | parent::__construct($settings); |
| 15 | 15 | $c = $this->getContainer(); |
| 16 | - $c['errorHandler'] = function($c) { return new WebErrorHandler();}; |
|
| 16 | + $c['errorHandler'] = function($c) |
|
| 17 | + { |
|
| 18 | +return new WebErrorHandler();}; |
|
| 17 | 19 | $this->add(new AuthMiddleware()); |
| 18 | 20 | $this->add(new ODataMiddleware()); |
| 19 | 21 | } |
@@ -25,7 +27,9 @@ discard block |
||
| 25 | 27 | |
| 26 | 28 | public function registerAPI($uri, $api) |
| 27 | 29 | { |
| 28 | - $group = $this->group($uri, function() use($api){$api->setup($this);}); |
|
| 30 | + $group = $this->group($uri, function() use($api) |
|
| 31 | + { |
|
| 32 | +$api->setup($this);}); |
|
| 29 | 33 | $group->add(new \Flipside\Http\Rest\SerializationMiddleware()); |
| 30 | 34 | $group->add(new \Flipside\Http\Rest\CORSMiddleware($this->getContainer())); |
| 31 | 35 | } |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $odata = $request->getAttribute('odata', new \Flipside\ODataParams(array())); |
| 109 | 109 | $params = $this->manipulateParameters($request, $odata); |
| 110 | 110 | $areas = $dataTable->read($odata->filter, $odata->select, $odata->top, |
| 111 | - $odata->skip, $odata->orderby, $params); |
|
| 111 | + $odata->skip, $odata->orderby, $params); |
|
| 112 | 112 | if($areas === false) |
| 113 | 113 | { |
| 114 | 114 | $areas = array(); |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | $odata = $request->getAttribute('odata', new \Flipside\ODataParams(array())); |
| 160 | 160 | $filter = $this->getFilterForPrimaryKey($args['name']); |
| 161 | 161 | $areas = $dataTable->read($filter, $odata->select, $odata->top, |
| 162 | - $odata->skip, $odata->orderby); |
|
| 162 | + $odata->skip, $odata->orderby); |
|
| 163 | 163 | if(empty($areas)) |
| 164 | 164 | { |
| 165 | 165 | return $response->withStatus(404); |