PHPePub\Core\Structure\Opf::addColaborator PHP Method

addColaborator() public method

..
public addColaborator ( string $name, string $fileAs = null, string $role = null )
$name string
$fileAs string
$role string Use the MarcCode constants
    function addColaborator($name, $fileAs = null, $role = null)
    {
        $dc = new DublinCore(DublinCore::CONTRIBUTOR, trim($name));
        if ($fileAs !== null) {
            $dc->addOpfAttr("file-as", trim($fileAs));
        }
        if ($role !== null) {
            $dc->addOpfAttr("role", trim($role));
        }
        $this->metadata->addDublinCore($dc);
    }