%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.149 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/water/vendor/yiisoft/yii2-authclient/src/ |
Upload File : |
<?php /** * @link http://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license http://www.yiiframework.com/license/ */ namespace yii\authclient; use Yii; use yii\authclient\StateStorageInterface; use yii\caching\Cache; use yii\base\Component; use yii\di\Instance; /** * CacheStateStorage provides Auth client state storage based in cache component. * * @see StateStorageInterface * */ class CacheStateStorage extends Component implements StateStorageInterface { /** * @var Cache|array|string cache object or the application component ID of the cache object to be used. * * After the CacheStateStorage object is created, if you want to change this property, * you should only assign it with a cache object. * * If not set - application 'cache' component will be used, but only, if it is available (e.g. in web application), * otherwise - no cache will be used and no data saving will be performed. */ public $cache; public $prefix = 'cacheStorage'; /** * {@inheritdoc} */ public function init() { parent::init(); if ($this->cache === null) { if (Yii::$app->has('cache')) { $this->cache = Yii::$app->get('cache'); } } else { $this->cache = Instance::ensure($this->cache, Cache::class); } } /** * {@inheritdoc} */ public function set($key, $value) { if ($this->cache !== null) { $this->cache->set($this->prefix . $key, $value); } } /** * {@inheritdoc} */ public function get($key) { if ($this->cache !== null) { return $this->cache->get($this->prefix . $key); } return null; } /** * {@inheritdoc} */ public function remove($key) { if ($this->cache !== null) { return $this->cache->delete($this->prefix . $key); } return true; } }