diff options
Diffstat (limited to 'vendor/mikespub/php-epub-meta/src/Contents/Toc.php')
-rw-r--r-- | vendor/mikespub/php-epub-meta/src/Contents/Toc.php | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/vendor/mikespub/php-epub-meta/src/Contents/Toc.php b/vendor/mikespub/php-epub-meta/src/Contents/Toc.php new file mode 100644 index 000000000..7992c4a8e --- /dev/null +++ b/vendor/mikespub/php-epub-meta/src/Contents/Toc.php @@ -0,0 +1,63 @@ +<?php + +namespace SebLucas\EPubMeta\Contents; + +/** + * EPUB TOC structure for EPUB 2 + * + * @author Simon Schrape <simon@epubli.com> + */ +class Toc +{ + /** @var string */ + protected $docTitle; + /** @var string */ + protected $docAuthor; + /** @var NavPointList */ + protected $navMap; + + /** + * Summary of __construct + * @param string $title + * @param string $author + */ + public function __construct($title, $author) + { + $this->docTitle = $title; + $this->docAuthor = $author; + $this->navMap = new NavPointList(); + } + + /** + * @return string + */ + public function getDocTitle() + { + return $this->docTitle; + } + + /** + * @return string + */ + public function getDocAuthor() + { + return $this->docAuthor; + } + + /** + * @return NavPointList + */ + public function getNavMap() + { + return $this->navMap; + } + + /** + * @param string $file + * @return array|NavPoint[] + */ + public function findNavPointsForFile($file) + { + return $this->getNavMap()->findNavPointsForFile($file); + } +} |