original_string: public function setAuthor($author, $sort_key = '')
      {
          $this->creator = $this->metadata->appendChild($this->createElement('dc:creator'));
          $this->creator->setAttribute('opf:role', "aut");
          $txt = $this->createTextNode($author);
          $this->creator->appendChild($txt);
          if ($sort_key) {
              $this->creator->setAttribute('opf:file-as', $sort_key);
          }
      }
code: public function setAuthor($author, $sort_key = '')
      {
          $this->creator = $this->metadata->appendChild($this->createElement('dc:creator'));
          $this->creator->setAttribute('opf:role', "aut");
          $txt = $this->createTextNode($author);
          $this->creator->appendChild($txt);
          if ($sort_key) {
              $this->creator->setAttribute('opf:file-as', $sort_key);
          }
      }
code_tokens: public function setAuthor ( $ author , $ sort_key = '' ) { $ this -> creator = $ this -> metadata -> appendChild ( $ this -> createElement ( 'dc:creator' ) ) ; $ this -> creator -> setAttribute ( 'opf:role' , "aut" ) ; $ txt = $ this -> createTextNode ( $ author ) ; $ this -> creator -> appendChild ( $ txt ) ; if ( $ sort_key ) { $ this -> creator -> setAttribute ( 'opf:file-as' , $ sort_key ) ; } }
docstring: Book author or creator, optional.
  .
  @param string $author   Used for the dc:creator metadata parameter in the
  OPF file
  @param string $sort_key is basically how the name is to be sorted, usually
  it's "Lastname, First names" where the $author is the straight
  "Firstnames Lastname"
docstring_tokens: Book author or creator optional . .