Axiom (v1.2.0)

A lightweight PHP framework
axTreeItem Class Reference

Tree Item Class. More...

Public Member Functions

 setValue ($v)
 Value setter.
 getValue ()
 Valxue getter.
 __isset ($k)
 Tells if a child exists.
 __get ($k)
 Child getter.
 __set ($k, $v)
 Child setter.
 __unset ($k)
 Unset a child.
 offsetExists ($k)
 offsetExist implementation, alias of axTreeItem::__isset()
 offsetGet ($k)
 offsetGet implementation, alias of axTreeItem::__get()
 offsetSet ($k, $v)
 offsetSet implementation, alias of axTreeItem::__set()
 offsetUnset ($k)
 offsetUnset implementation, alias of axTreeItem::__unset()
 current ()
 current implementation, returns the current child
 key ()
 key implementation, returns the current key
 next ()
 next implementation
 rewind ()
 rewind implementation
 valid ()
 valid implementation
 __toString ()
 __toString implementation

Static Public Member Functions

static __set_state ($props)
 __set_state implementation

Protected Attributes

 $_v
 Value.
 $_c
 Children.

Detailed Description

Tree Item Class.

This class implements a tree on which branches can also have a value.

Author:
Delespierre
License:
http://www.gnu.org/licenses/lgpl.html Lesser General Public Licence version 3

Definition at line 18 of file axTreeItem.class.php.


Member Function Documentation

Child getter.

Note:
If the child doesn't exists, an empty child will be created and returned. Thus you will never face an error accessing an inexisting tree item (but you'll get empty leaf/branches).
Parameters:
string$kThe branche/leaf key
Returns:
axConfigurationItem

Definition at line 68 of file axTreeItem.class.php.

Tells if a child exists.

Parameters:
scalar$k
Returns:
boolean

Definition at line 55 of file axTreeItem.class.php.

axTreeItem::__set ( k,
v 
)

Child setter.

Parameters:
string$k
mixed$v
Returns:
void

Definition at line 80 of file axTreeItem.class.php.

static axTreeItem::__set_state ( props) [static]

__set_state implementation

Parameters:
array$props
Returns:
axTreeItem

Definition at line 197 of file axTreeItem.class.php.

__toString implementation

Get the string representation of current instance's value.

Returns:
string

Definition at line 186 of file axTreeItem.class.php.

Unset a child.

Parameters:
scalar$k
Returns:
void

Definition at line 89 of file axTreeItem.class.php.

current implementation, returns the current child

See also:
Iterator::current()
Returns:
axTreeItem

Definition at line 139 of file axTreeItem.class.php.

Valxue getter.

Returns:
mixed

Definition at line 46 of file axTreeItem.class.php.

key implementation, returns the current key

See also:
Iterator::key()
Returns:
scalar

Definition at line 148 of file axTreeItem.class.php.

next implementation

See also:
Iterator::next()
Returns:
axTreeItem

Definition at line 157 of file axTreeItem.class.php.

offsetExist implementation, alias of axTreeItem::__isset()

See also:
ArrayAccess::offsetExists()
Parameters:
scalar$kThe offset
Returns:
boolean

Definition at line 99 of file axTreeItem.class.php.

offsetGet implementation, alias of axTreeItem::__get()

See also:
ArrayAccess::offsetGet()
Parameters:
scalar$kThe offset
Returns:
mixed

Definition at line 109 of file axTreeItem.class.php.

axTreeItem::offsetSet ( k,
v 
)

offsetSet implementation, alias of axTreeItem::__set()

See also:
ArrayAccess::offsetSet()
Parameters:
scalar$kThe offset
mixed$vThe value void

Definition at line 120 of file axTreeItem.class.php.

offsetUnset implementation, alias of axTreeItem::__unset()

See also:
ArrayAccess::offsetUnset()
Parameters:
scalar$kThe offset
Returns:
void

Definition at line 130 of file axTreeItem.class.php.

rewind implementation

See also:
Iterator::rewind()
Returns:
void

Definition at line 166 of file axTreeItem.class.php.

Value setter.

Parameters:
mixed$v
Returns:
axTreeItem

Definition at line 37 of file axTreeItem.class.php.

valid implementation

See also:
Iterator::valid() boolean

Definition at line 175 of file axTreeItem.class.php.


Field Documentation

array axTreeItem::$_c [protected]

Children.

Definition at line 30 of file axTreeItem.class.php.

mixed axTreeItem::$_v [protected]

Value.

Definition at line 24 of file axTreeItem.class.php.


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables