get() public method

Returns the cookie with the specified name.
See also: getValue()
public get ( string $name ) : Cookie
$name string the cookie name
return Cookie the cookie with the specified name. Null if the named cookie does not exist.
Ejemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function bootstrap($app)
 {
     //echo preg_replace('/ \((?!(The|UCSD)\)).*?\)/', '', 'The makanan UCSD');exit;
     if ($app instanceof \yii\web\Application) {
         $activeTheme = $this->defaultTheme;
         if ($this->useDbConfig) {
         } else {
             $cookie = new CookieCollection();
             if ($themeNameFromCookie = $cookie->get($this->themeCookieName)) {
                 $activeTheme = $themeNameFromCookie;
             }
         }
         if (!$activeTheme) {
             $activeTheme = $this->getTheme($app);
         }
     }
 }