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

저자: Victor Puertas ([email protected])
파일 보기 프로젝트 열기: spress/spress 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( ) Constructor.
addDataSource ( string $name, AbstractDataSource $dataSource ) Adds a new data source.
clearDataSource ( ) Clears all data sources registered.
getDataSource ( $name ) : AbstractDataSource Gets a data source.
getDataSourceNames ( ) : string[] Gets the name of the registered data sources.
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".
hasDataSource ( string $name ) : boolean Checks if a data source exists.
load ( ) Load the items from the registered data sources.
removeDataSource ( string $name ) Removes a data source.
setDataSource ( string $name, AbstractDataSource $dataSource ) Sets a data source.

비공개 메소드들

메소드 설명
initialize ( )
processIncludes ( array $items, $dataSourceName )
processItems ( array $items, $dataSourceName )
processLayouts ( array $items, $dataSourceName )

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( )

addDataSource() 공개 메소드

Adds a new data source.
public addDataSource ( string $name, AbstractDataSource $dataSource )
$name string The name of the data source
$dataSource AbstractDataSource

clearDataSource() 공개 메소드

Clears all data sources registered.
public clearDataSource ( )

getDataSource() 공개 메소드

Gets a data source.
public getDataSource ( $name ) : AbstractDataSource
리턴 AbstractDataSource

getDataSourceNames() 공개 메소드

Gets the name of the registered data sources.
public getDataSourceNames ( ) : string[]
리턴 string[]

getIncludes() 공개 메소드

Returns the list of items with type "include".
public getIncludes ( ) : array
리턴 array

getItems() 공개 메소드

Returns the list of items.
public getItems ( ) : array
리턴 array

getLayouts() 공개 메소드

Returns the list of items with type "layout".
public getLayouts ( ) : array
리턴 array

hasDataSource() 공개 메소드

Checks if a data source exists.
public hasDataSource ( string $name ) : boolean
$name string The name of the data source
리턴 boolean

load() 공개 메소드

Load the items from the registered data sources.
public load ( )

removeDataSource() 공개 메소드

Removes a data source.
public removeDataSource ( string $name )
$name string The name of the data source

setDataSource() 공개 메소드

Sets a data source.
public setDataSource ( string $name, AbstractDataSource $dataSource )
$name string The name of the data source
$dataSource AbstractDataSource