Esempio n. 1
0
 public function reset()
 {
     static::$disableSession = false;
     static::$disableCsrfCheck = false;
     $this->cookies->reset();
     $this->response->setContent('')->resetHeaders()->setStatusCode(200);
 }
Esempio n. 2
0
 public static function register(Di $di)
 {
     static::$di = $di;
     $di->set('Phalcon\\Http\\Cookie', 'Phwoolcon\\Http\\Cookie');
     static::$cookies = static::$di->getShared('cookies');
     static::$cookies->reset();
     static::$options = $options = Config::get('cookies');
     static::$cookies->useEncryption($encrypt = $options['encrypt']);
     $encrypt and static::$di->getShared('crypt')->setKey($options['encrypt_key'])->setPadding(Crypt::PADDING_ZERO);
     /* @var \Phalcon\Http\Response $response */
     if ($response = $di->getShared('response')) {
         $response->setCookies(static::$cookies);
     }
     Events::attach('view:generatePhwoolconJsOptions', function (Event $event) {
         $options = $event->getData() ?: [];
         $options['cookies'] = ['domain' => static::$options['domain'], 'path' => static::$options['path']];
         $event->setData($options);
         return $options;
     });
 }
Esempio n. 3
0
 public function reset()
 {
     return parent::reset();
 }