public function getNextPage($filepath, $entityBase)
    {
        $grabNext = false;
        $fallback = null;

        foreach ($this->getPages() as $url => $page) {
            if ($grabNext && strpos($page['filepath'], $entityBase) !== false) {
                return new ArrayData(
                    array(
                    'Link' => $this->buildUrl($url),
                    'Title' => $page['title']
                    )
                );
            }

            if ($filepath == $page['filepath']) {
                $grabNext = true;
            } elseif (!$fallback && strpos($page['filepath'], $filepath) !== false) {
                $fallback = new ArrayData(
                    array(
                    'Link' => $this->buildUrl($url),
                    'Title' => $page['title'],
                    'Fallback' => true
                    )
                );
            }
        }

        if (!$grabNext) {
            return $fallback;
        }

        return null;
    }
public function getNextPage($filepath, $entityBase)
    {
        $grabNext = false;
        $fallback = null;

        foreach ($this->getPages() as $url => $page) {
            if ($grabNext && strpos($page['filepath'], $entityBase) !== false) {
                return new ArrayData(
                    array(
                    'Link' => $this->buildUrl($url),
                    'Title' => $page['title']
                    )
                );
            }

            if ($filepath == $page['filepath']) {
                $grabNext = true;
            } elseif (!$fallback && strpos($page['filepath'], $filepath) !== false) {
                $fallback = new ArrayData(
                    array(
                    'Link' => $this->buildUrl($url),
                    'Title' => $page['title'],
                    'Fallback' => true
                    )
                );
            }
        }

        if (!$grabNext) {
            return $fallback;
        }

        return null;
    }
public function getNextPage ( $ filepath , $ entityBase ) { $ grabNext = false ; $ fallback = null ; foreach ( $ this -> getPages ( ) as $ url => $ page ) { if ( $ grabNext && strpos ( $ page [ 'filepath' ] , $ entityBase ) !== false ) { return new ArrayData ( array ( 'Link' => $ this -> buildUrl ( $ url ) , 'Title' => $ page [ 'title' ] ) ) ; } if ( $ filepath == $ page [ 'filepath' ] ) { $ grabNext = true ; } elseif ( ! $ fallback && strpos ( $ page [ 'filepath' ] , $ filepath ) !== false ) { $ fallback = new ArrayData ( array ( 'Link' => $ this -> buildUrl ( $ url ) , 'Title' => $ page [ 'title' ] , 'Fallback' => true ) ) ; } } if ( ! $ grabNext ) { return $ fallback ; } return null ; }
Determine the next page from the given page.

Relies on the fact when the manifest was built, it was generated in
order.

@param string $filepath
@param string $entityBase

@return ArrayData
Determine the next page from the given page .