Pages::from()
Object instantiator.
Table of Contents
Description
Pages::from(iterable $value = []): self;
Pages::from(string $folder = LOT . D . 'page', string $x = 'page', int|true $deep = 0): self;
It is just a shortcut for the Pages::__construct()
way.
Example
$pages = Pages::from([
'.\lot\page\article\article-1.page',
'.\lot\page\article\article-2.page',
'.\lot\page\article\article-3.page'
]);
The example above is the same as the instantiation below:
$pages = new Pages([
'.\lot\page\article\article-1.page',
'.\lot\page\article\article-2.page',
'.\lot\page\article\article-3.page'
]);
This method also takes an argument in the form of a folder path, along with other arguments such as those found in the g()
function:
$pages = Pages::from('.\lot\page\article');
Pages::__construct()
The constructor.
Pages::__get()
Gets a custom property of pages.
Pages::__isset()
Checks if a custom property of pages returns non-null value.
Pages::__set()
Sets a custom property of pages.
Pages::__unset()
Deletes a custom property of pages.
Pages::from()
Object instantiator.