PHPePub\Core\EPub::addCustomMetadata PHP Method

addCustomMetadata() public method

It is up to the builder to make sure there are no collisions. Metadata are just key value pairs.
public addCustomMetadata ( string $name, string $content )
$name string
$content string
    function addCustomMetadata($name, $content)
    {
        if ($this->isFinalized) {
            return;
        }
        $this->opf->addMeta($name, $content);
    }

Usage Example

Beispiel #1
0
 /**
  * @param EPub   $book
  * @param string $seriesName
  * @param string $seriesIndex
  * @param string $sortTitle
  */
 public static function setCalibreMetadata($book, $seriesName, $seriesIndex, $sortTitle = null)
 {
     $book->addCustomMetadata("calibre:series", $seriesName);
     $book->addCustomMetadata("calibre:series_index", "" . $seriesIndex);
     if (!empty($sortTitle)) {
         $book->addCustomMetadata("calibre:title_sort", $sortTitle);
     }
 }
All Usage Examples Of PHPePub\Core\EPub::addCustomMetadata