diff options
Diffstat (limited to 'vendor/mikespub/php-epub-meta/src/Contents/NavPointList.php')
-rw-r--r-- | vendor/mikespub/php-epub-meta/src/Contents/NavPointList.php | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/vendor/mikespub/php-epub-meta/src/Contents/NavPointList.php b/vendor/mikespub/php-epub-meta/src/Contents/NavPointList.php deleted file mode 100644 index 540d2f876..000000000 --- a/vendor/mikespub/php-epub-meta/src/Contents/NavPointList.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php - -namespace SebLucas\EPubMeta\Contents; - -use ArrayIterator; - -/** - * A list of EPUB TOC navigation points. - * - * @author Simon Schrape <simon@epubli.com> - * @author mikespub - * @extends ArrayIterator<int, NavPoint> - */ -class NavPointList extends ArrayIterator -{ - public function __construct() {} - - /** - * @return NavPoint - */ - public function first() - { - $this->rewind(); - return $this->current(); - } - - /** - * @return NavPoint - */ - public function last() - { - $this->seek($this->count() - 1); - return $this->current(); - } - - /** - * @param NavPoint $navPoint - * @return void - * @deprecated 2.1.0 use normal append() instead - */ - public function addNavPoint(NavPoint $navPoint) - { - $this->append($navPoint); - } - - /** - * @param string $file - * - * @return array|NavPoint[] - */ - public function findNavPointsForFile($file) - { - $matches = []; - foreach ($this as $navPoint) { - if ($navPoint->getContentSourceFile() == $file) { - $matches[] = $navPoint; - } - $childMatches = $navPoint->getChildren()->findNavPointsForFile($file); - if (count($childMatches)) { - $matches = array_merge($matches, $childMatches); - } - } - return $matches; - } -} |