PHP 클래스 Yosymfony\Spress\Core\DataSource\AbstractDataSource

Data sources can load site data from certain locations.
저자: Victor Puertas ([email protected])
파일 보기 프로젝트 열기: spress/spress

보호된 프로퍼티들

프로퍼티 타입 설명
$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