Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

StackItem Class Reference

List of all members.

Public Member Functions

 __construct ($name, $version, $resource)
 __get ($name)
 add_dependency ($itemname, $version=null)
 get_dependencies ()
 in_stack_index ($stack)

Static Public Member Functions

static register ($name, $resource= '', $version=0)
static get ($name, $version=null)

Public Attributes

 $dependencies = array()
 $resource = ''

Static Public Attributes

static $items = array()

Detailed Description

Definition at line 15 of file stackitem.php.


Constructor & Destructor Documentation

StackItem::__construct ( name,
version,
resource 
)

Constructor for StackItem

Parameters:
string $name Name of the item
string $version PHP version string-compatible version number
mixed $resource Value of the item

Definition at line 27 of file stackitem.php.


Member Function Documentation

StackItem::add_dependency ( itemname,
version = null 
)

Add a dependency to this StackItem

Parameters:
string|StackItem $itemname The name of the stack item upon which this item depends
null|string $version Optional PHP-compatible version number string
Returns:
StackItem Fluid interface returns $this

Definition at line 64 of file stackitem.php.

static StackItem::get ( name,
version = null 
) [static]

Get the named stack item

Parameters:
string $name Name of the stack item to get
string $version (optional) Minimum version number of the item to get

Definition at line 130 of file stackitem.php.

Referenced by Stack::add(), and get_dependencies().

StackItem::get_dependencies (  ) 

Get the dependencies for this item

Returns:
array An array of StackItems that this item depends on

Definition at line 79 of file stackitem.php.

StackItem::in_stack_index ( stack  ) 

Determine if this item is in the specified stack array

Parameters:
Array $stack The stack to look in for this item
Returns:
bool True if the stack contains an index that matches this item's name

Definition at line 101 of file stackitem.php.

static StackItem::register ( name,
resource = '',
version = 0 
) [static]
Parameters:
string $name Name of the item to register
string $resource The resource to
string $version Verison of the item to register
Returns:
StackItem

Definition at line 112 of file stackitem.php.

Referenced by Stack::action_register_stackitems(), and Stack::add().


The documentation for this class was generated from the following file: