@@ -2,9 +2,9 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | /* Example with Anax-MVC */ |
| 4 | 4 | |
| 5 | -require __DIR__.'/config_with_app.php'; |
|
| 5 | +require __DIR__ . '/config_with_app.php'; |
|
| 6 | 6 | |
| 7 | -$di->setShared("cache", function () { |
|
| 7 | +$di->setShared("cache", function() { |
|
| 8 | 8 | $cache = new \Anax\Cache\CCachePool(); |
| 9 | 9 | return $cache; |
| 10 | 10 | }); |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | $app->url->setUrlType(\Anax\Url\CUrl::URL_CLEAN); |
| 15 | 15 | |
| 16 | 16 | //root |
| 17 | -$app->router->add('cache', function () use ($app) { |
|
| 17 | +$app->router->add('cache', function() use ($app) { |
|
| 18 | 18 | // Start the session |
| 19 | 19 | $app->session(); |
| 20 | 20 | |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | * @return void |
| 13 | 13 | */ |
| 14 | 14 | spl_autoload_register( |
| 15 | - function ($class) { |
|
| 15 | + function($class) { |
|
| 16 | 16 | // project-specific namespace prefix |
| 17 | 17 | //$prefix = 'Foo\\Bar\\'; |
| 18 | 18 | $prefix = 'Anax\\'; |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | // autoloader for 'Psr\' |
| 42 | 42 | spl_autoload_register( |
| 43 | - function ($class) { |
|
| 43 | + function($class) { |
|
| 44 | 44 | // project-specific namespace prefix |
| 45 | 45 | //$prefix = 'Foo\\Bar\\'; |
| 46 | 46 | $prefix = 'Psr\\'; |
@@ -228,7 +228,6 @@ |
||
| 228 | 228 | * |
| 229 | 229 | * @param array $keys |
| 230 | 230 | * An array of keys that should be removed from the pool. |
| 231 | - |
|
| 232 | 231 | * @throws InvalidArgumentException |
| 233 | 232 | * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException |
| 234 | 233 | * MUST be thrown. |
@@ -136,7 +136,7 @@ |
||
| 136 | 136 | // Iterates all keys and gets the associated item |
| 137 | 137 | $items = array(); |
| 138 | 138 | $nKeys = count($keys); |
| 139 | - for ($i=0; $i < $nKeys; $i++) { |
|
| 139 | + for ($i = 0; $i < $nKeys; $i++) { |
|
| 140 | 140 | $items[(string) $keys[$i]] = $this->getItem($keys[$i]); |
| 141 | 141 | } |
| 142 | 142 | |
@@ -228,7 +228,6 @@ |
||
| 228 | 228 | * |
| 229 | 229 | * @param array $keys |
| 230 | 230 | * An array of keys that should be removed from the pool. |
| 231 | - |
|
| 232 | 231 | * @throws InvalidArgumentException |
| 233 | 232 | * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException |
| 234 | 233 | * MUST be thrown. |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | $this->key = $key; |
| 52 | 52 | $this->value = $value; |
| 53 | 53 | |
| 54 | - $this->timeZone = is_null($timeZone) ? new \DateTimeZone('Europe/London') : $timeZone; |
|
| 54 | + $this->timeZone = is_null($timeZone) ? new \DateTimeZone('Europe/London') : $timeZone; |
|
| 55 | 55 | $this->defaultExpiration = '2999-12-12'; |
| 56 | 56 | |
| 57 | 57 | $this->expiration = is_null($expiration) ? |