original_string: public function setMessage($data)
      {
          // initialize a flash session variable
          if(!isset($_SESSION['flash'])) {
              $_SESSION['flash'] = array();
          }
  
          // check for valid message template. Set to default if not valid
          if(!in_array($data['type'], $this->valid)) {
              $data['type'] = $this->valid[0];
          }
  
          $_SESSION['flash']['type'] = $data['type'];
          $_SESSION['flash']['message'] = $data['message'];
  
          return true;
      }
code: public function setMessage($data)
      {
          // initialize a flash session variable
          if(!isset($_SESSION['flash'])) {
              $_SESSION['flash'] = array();
          }
  
          // check for valid message template. Set to default if not valid
          if(!in_array($data['type'], $this->valid)) {
              $data['type'] = $this->valid[0];
          }
  
          $_SESSION['flash']['type'] = $data['type'];
          $_SESSION['flash']['message'] = $data['message'];
  
          return true;
      }
code_tokens: public function setMessage ( $ data ) { // initialize a flash session variable if ( ! isset ( $ _SESSION [ 'flash' ] ) ) { $ _SESSION [ 'flash' ] = array ( ) ; } // check for valid message template. Set to default if not valid if ( ! in_array ( $ data [ 'type' ] , $ this -> valid ) ) { $ data [ 'type' ] = $ this -> valid [ 0 ] ; } $ _SESSION [ 'flash' ] [ 'type' ] = $ data [ 'type' ] ; $ _SESSION [ 'flash' ] [ 'message' ] = $ data [ 'message' ] ; return true ; }
docstring: Set the message into session variable
  
  @return boolean
docstring_tokens: Set the message into session variable