PHP Класс Habari\StackItem

This class represents a single item that can be used as a component in Habari's stack output
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$dependencies
$items
$resource

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

Метод Описание
__construct ( string $name, string $version, mixed $resource ) Constructor for StackItem
__get ( $name )
__toString ( ) : string Define behavior for when this StackItem is cast to a string
add_dependency ( string | StackItem $itemname, null | string $version = null ) : StackItem Add a dependency to this StackItem
get ( string $name, string $version = null ) Get the named stack item
get_dependencies ( ) : array Get the dependencies for this item
in_stack_index ( Array $stack ) : boolean Determine if this item is in the specified stack array
register ( string $name, string $resource = '', string $version ) : StackItem

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

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

Constructor for StackItem
public __construct ( string $name, string $version, mixed $resource )
$name string Name of the item
$version string PHP version string-compatible version number
$resource mixed Value of the item

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

public __get ( $name )

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

Define behavior for when this StackItem is cast to a string
public __toString ( ) : string
Результат string

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

Add a dependency to this StackItem
public add_dependency ( string | StackItem $itemname, null | string $version = null ) : StackItem
$itemname string | StackItem The name of the stack item upon which this item depends
$version null | string Optional PHP-compatible version number string
Результат StackItem Fluid interface returns $this

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

Get the named stack item
public static get ( string $name, string $version = null )
$name string Name of the stack item to get
$version string (optional) Minimum version number of the item to get

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

Get the dependencies for this item
public get_dependencies ( ) : array
Результат array An array of StackItems that this item depends on

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

Determine if this item is in the specified stack array
public in_stack_index ( Array $stack ) : boolean
$stack Array The stack to look in for this item
Результат boolean True if the stack contains an index that matches this item's name

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

public static register ( string $name, string $resource = '', string $version ) : StackItem
$name string Name of the item to register
$resource string The resource to
$version string Verison of the item to register
Результат StackItem

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

$dependencies публичное свойство

public $dependencies

$items статическое публичное свойство

static public $items

$resource публичное свойство

public $resource