PHP Интерфейс Yosymfony\Spress\Core\ContentManager\SiteAttribute\SiteAttributeInterface

e.g: "site.pages.page1". The site atributes is the array structure of attriutes used by your site.
Автор: Victor Puertas ([email protected])
Показать файл Открыть проект

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

Метод Описание
addAttribute ( string $name, mixed $value ) Adds an attribute using "dot" notation if doesn't exists.
getAttribute ( string $name ) : mixed Get a value using "dot" notation.
getAttributes ( ) : array Gets the site attributes.
hasAttribute ( string $name ) : boolean Check if an attribute exists in using "dot" notation.
initialize ( array $attributes = [] ) Initializes the site attributes structure.
setAttribute ( string $name, mixed $value ) Set an attribute using "dot" notation.
setItem ( Yosymfony\Spress\Core\DataSource\ItemInterface $item ) Called in some phase of Spress's lifecycle: - invoqued to all items just before first spress.before_render_block event.

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

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

You can to escape a dot in a key surrendering with brackets: "[.]". e.g: $a->addAttribute('site.name', 'Spress site'); $a->addAttribute('site.pages.index[.]html', 'The content');
public addAttribute ( string $name, mixed $value )
$name string The name of the attribute
$value mixed The value of the attribute

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

You can to escape a dot in a key surrendering with brackets: "[.]".
public getAttribute ( string $name ) : mixed
$name string
Результат mixed

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

Gets the site attributes.
public getAttributes ( ) : array
Результат array The attributes

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

You can to escape a dot in a key surrendering with brackets: "[.]".
public hasAttribute ( string $name ) : boolean
$name string The name of the attribute
Результат boolean

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

Initializes the site attributes structure.
public initialize ( array $attributes = [] )
$attributes array Initial attributes

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

Set an attribute using "dot" notation.
public setAttribute ( string $name, mixed $value )
$name string The name of the attribute
$value mixed The value of the attribute

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

- before and after of each spress.*_render_* event.
public setItem ( Yosymfony\Spress\Core\DataSource\ItemInterface $item )
$item Yosymfony\Spress\Core\DataSource\ItemInterface