original_string: public function check($name = null)
      {
          if ($this->_hasSession() && !$this->started()) {
              $this->start();
          }
  
          if (!isset($_SESSION)) {
              return false;
          }
  
          return Hash::get($_SESSION, $name) !== null;
      }
code: public function check($name = null)
      {
          if ($this->_hasSession() && !$this->started()) {
              $this->start();
          }
  
          if (!isset($_SESSION)) {
              return false;
          }
  
          return Hash::get($_SESSION, $name) !== null;
      }
code_tokens: public function check ( $ name = null ) { if ( $ this -> _hasSession ( ) && ! $ this -> started ( ) ) { $ this -> start ( ) ; } if ( ! isset ( $ _SESSION ) ) { return false ; } return Hash :: get ( $ _SESSION , $ name ) !== null ; }
docstring: Returns true if given variable name is set in session.
  
  @param string|null $name Variable name to check for
  @return bool True if variable is there
docstring_tokens: Returns true if given variable name is set in session .