original_string: protected function get_messages() {
          global $SESSION;
  
          $messages = array();
          if (!empty($SESSION->lesson_messages) && is_array($SESSION->lesson_messages) && array_key_exists($this->properties->id, $SESSION->lesson_messages)) {
              $messages = $SESSION->lesson_messages[$this->properties->id];
              unset($SESSION->lesson_messages[$this->properties->id]);
          }
  
          return $messages;
      }
code: protected function get_messages() {
          global $SESSION;
  
          $messages = array();
          if (!empty($SESSION->lesson_messages) && is_array($SESSION->lesson_messages) && array_key_exists($this->properties->id, $SESSION->lesson_messages)) {
              $messages = $SESSION->lesson_messages[$this->properties->id];
              unset($SESSION->lesson_messages[$this->properties->id]);
          }
  
          return $messages;
      }
code_tokens: protected function get_messages ( ) { global $ SESSION ; $ messages = array ( ) ; if ( ! empty ( $ SESSION -> lesson_messages ) && is_array ( $ SESSION -> lesson_messages ) && array_key_exists ( $ this -> properties -> id , $ SESSION -> lesson_messages ) ) { $ messages = $ SESSION -> lesson_messages [ $ this -> properties -> id ] ; unset ( $ SESSION -> lesson_messages [ $ this -> properties -> id ] ) ; } return $ messages ; }
docstring: Fetches messages from the session that may have been set in previous page
  actions.
  
  <code>
  // Do not call this method directly instead use
  $lesson->messages;
  </code>
  
  @return array
docstring_tokens: Fetches messages from the session that may have been set in previous page actions .