PHP Класс Yosymfony\Spress\Core\DataSource\AbstractDataSource

Data sources can load site data from certain locations.
Автор: Victor Puertas ([email protected])
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$isConfigured
$params
$referenceCounter

Открытые методы

Метод Описание
__construct ( array $params = [] ) Constructor.
addItem ( Yosymfony\Spress\Core\DataSource\ItemInterface $item ) Creates a new item or layout in the data source.
addUse ( ) Marks as used the data source.
configure ( ) This method is used for setting up a site’s data source for the first time.
getIncludes ( ) : array Returns the list of items with type "include".
getItems ( ) : array Returns the list of items.
getLayouts ( ) : array Returns the list of items with type "layout".
load ( ) Loads the data source.
process ( ) All data source data manipulations and queries.
removeUse ( ) Marks as unused the data source.
setUp ( ) Brings up the connections to the data.
tearDown ( ) Brings down the connections to the data.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( array $params = [] )
$params array Params for initialize the data source

addItem() публичный Метод

Creates a new item or layout in the data source.
public addItem ( Yosymfony\Spress\Core\DataSource\ItemInterface $item )
$item Yosymfony\Spress\Core\DataSource\ItemInterface

addUse() публичный Метод

This method increases the internal reference count. When the internal reference count goes from 0 to 1 setUp method is invoked.
public addUse ( )

configure() публичный Метод

This method is used for setting up a site’s data source for the first time.
public configure ( )

getIncludes() абстрактный публичный Метод

Returns the list of items with type "include".
abstract public getIncludes ( ) : array
Результат array

getItems() абстрактный публичный Метод

Returns the list of items.
abstract public getItems ( ) : array
Результат array

getLayouts() абстрактный публичный Метод

Returns the list of items with type "layout".
abstract public getLayouts ( ) : array
Результат array

load() публичный Метод

Loads the data source.
public load ( )

process() публичный Метод

All data source data manipulations and queries.
public process ( )

removeUse() публичный Метод

This method decreases the internal reference count. When the internal reference count is 0 tearDown method is invoked.
public removeUse ( )

setUp() публичный Метод

e.g: this is the ideal place to connect to the database.
public setUp ( )

tearDown() публичный Метод

e.g: a database connection established in setUp should be closed in this method.
public tearDown ( )

Описание свойств

$isConfigured защищенное свойство

protected $isConfigured

$params защищенное свойство

protected $params

$referenceCounter защищенное свойство

protected $referenceCounter