public function isValid($token)
    {
        $this->validatePrepared();

        return $this->sessionBag->has(self::CSRF_TKN_NAME) && 
               $this->sessionBag->has(self::CSRF_TKN_TIME) && 
               $this->sessionBag->get(self::CSRF_TKN_NAME) === $token;
    }
public function isValid($token)
    {
        $this->validatePrepared();

        return $this->sessionBag->has(self::CSRF_TKN_NAME) && 
               $this->sessionBag->has(self::CSRF_TKN_TIME) && 
               $this->sessionBag->get(self::CSRF_TKN_NAME) === $token;
    }
public function isValid ( $ token ) { $ this -> validatePrepared ( ) ; return $ this -> sessionBag -> has ( self :: CSRF_TKN_NAME ) && $ this -> sessionBag -> has ( self :: CSRF_TKN_TIME ) && $ this -> sessionBag -> get ( self :: CSRF_TKN_NAME ) === $ token ; }
Check whether coming token is valid

@param string $token Target token to be validated
@return boolean
Check whether coming token is valid