Cake\Network\Session::started PHP Метод

started() публичный Метод

Determine if Session has already been started.
public started ( ) : boolean
Результат boolean True if session has been started.
    public function started()
    {
        return $this->_started || session_status() === \PHP_SESSION_ACTIVE;
    }

Usage Example

Пример #1
3
 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->View = new View();
     $this->Session = new SessionHelper($this->View);
     Session::start();
     if (!Session::started()) {
         Session::start();
     }
     $_SESSION = array('test' => 'info', 'Message' => array('flash' => array('element' => 'default', 'params' => array(), 'message' => 'This is a calling'), 'notification' => array('element' => 'session_helper', 'params' => array('title' => 'Notice!', 'name' => 'Alert!'), 'message' => 'This is a test of the emergency broadcasting system'), 'classy' => array('element' => 'default', 'params' => array('class' => 'positive'), 'message' => 'Recorded'), 'bare' => array('element' => null, 'message' => 'Bare message', 'params' => array())), 'Deeply' => array('nested' => array('key' => 'value')));
 }
All Usage Examples Of Cake\Network\Session::started