original_string: public function add_alternate_version($title, $url, $mimetype) {
          if ($this->_state > self::STATE_BEFORE_HEADER) {
              throw new coding_exception('Cannot call moodle_page::add_alternate_version after output has been started.');
          }
          $alt = new stdClass;
          $alt->title = $title;
          $alt->url = $url;
          $this->_alternateversions[$mimetype] = $alt;
      }
code: public function add_alternate_version($title, $url, $mimetype) {
          if ($this->_state > self::STATE_BEFORE_HEADER) {
              throw new coding_exception('Cannot call moodle_page::add_alternate_version after output has been started.');
          }
          $alt = new stdClass;
          $alt->title = $title;
          $alt->url = $url;
          $this->_alternateversions[$mimetype] = $alt;
      }
code_tokens: public function add_alternate_version ( $ title , $ url , $ mimetype ) { if ( $ this -> _state > self :: STATE_BEFORE_HEADER ) { throw new coding_exception ( 'Cannot call moodle_page::add_alternate_version after output has been started.' ) ; } $ alt = new stdClass ; $ alt -> title = $ title ; $ alt -> url = $ url ; $ this -> _alternateversions [ $ mimetype ] = $ alt ; }
docstring: Sets an alternative version of this page.
  
  There can be alternate versions of some pages (for example an RSS feed version).
  Call this method for each alternative version available.
  For each alternative version a link will be included in the <head> tag.
  
  @param string $title The title to give the alternate version.
  @param string|moodle_url $url The URL of the alternate version.
  @param string $mimetype The mime-type of the alternate version.
  @throws coding_exception
docstring_tokens: Sets an alternative version of this page .