\Phile\RepositoryPage

the Repository class for pages

Summary

Methods
Properties
Constants
__construct()
findByPath()
findAll()
No public properties found
ORDER_ASC
ORDER_DESC
getPage()
compareByTitleAsc()
compareByTitleDesc()
$storage
$cache
N/A
No private methods found
No private properties found
N/A

Constants

ORDER_ASC

ORDER_ASC

ORDER_DESC

ORDER_DESC

Properties

$storage

$storage : array

Type

array — object storage for initialized objects, to prevent multiple loading of objects.

Methods

__construct()

__construct()

the constructor

findByPath()

findByPath(string $path, string $folder) : null|\Phile\Model\Page

find a page by path

Parameters

string $path
string $folder

Returns

null|\Phile\Model\Page

findAll()

findAll(array $options, string $folder) : array

find all pages (*.md) files and returns an array of Page models

Parameters

array $options
string $folder

Throws

\Phile\Exception

Returns

array —

of \Phile\Model\Page objects

getPage()

getPage(mixed $filePath, string $folder) : mixed|\Phile\Model\Page

get page from cache or filepath

Parameters

mixed $filePath
string $folder

Returns

mixed|\Phile\Model\Page

compareByTitleAsc()

compareByTitleAsc(\Phile\Model\Page $a, \Phile\Model\Page $b) : int

usort function for Titles Asc

Parameters

\Phile\Model\Page $a
\Phile\Model\Page $b

Returns

int

compareByTitleDesc()

compareByTitleDesc(\Phile\Model\Page $a, \Phile\Model\Page $b) : int

usort function for Titles Desc

Parameters

\Phile\Model\Page $a
\Phile\Model\Page $b

Returns

int