/**
  * @return string
  */
 public function getToken()
 {
     if ($this->token === null) {
         $name = $this->getTokenName();
         $token = Request::getCookieParam($name);
         if ($token !== null) {
             $this->token = $token;
         } else {
             throw new InvalidOperationException('Csrf protection is not initialized correctly.');
         }
     }
     return $this->token;
 }
 /**
  * @param string $name
  * @param mixed $default
  * @return mixed
  */
 public function getCookieParam($name, $default = null)
 {
     return Request::getCookieParam($name, $default);
 }