hasSession() public static method

This method does not give any information about the state of the session object, like whether the session is started or not. It is just a way to check if this Request is associated with a Session instance.
public static hasSession ( ) : boolean
return boolean true when the Request contains a Session object, false otherwise
Example #1
0
 function getValue()
 {
     if ($this->useOldValue && \Request::hasSession()) {
         return old($this->name, $this->value);
     } else {
         return $this->value;
     }
 }