src/sb/Ebook/Epub/OPF.php
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);
        }
    }
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);
        }
    }
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 ) ; } }
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"
Book author or creator optional . .