Beispiel #1
0
 /**
  * Check if \Phalcon\Di has session service
  *
  * @return bool
  */
 private function hasSession()
 {
     if (DI::getDefault()->has('session') === true) {
         // get instance of session class
         $this->session = DI::getDefault()->getSession();
         if ($this->session->getId() === '') {
             $this->session->start();
         }
         return true;
     }
     return false;
 }