Axiom (v1.2.0)

A lightweight PHP framework
axBaseHelper Class Reference

Base class for helpers. More...

+ Inheritance diagram for axBaseHelper:

Public Member Functions

 __construct ($node_name, $attributes=array(), $node_value=null)
 Constructor.
 setAttributes ($attributes)
 setValue ($value)
 getValue ()
 __call ($method, $args)
 __call implementation
 appendChild ($node)
 prependChild ($node)
 __toString ()

Protected Attributes

 $_node_name
 Node name.
 $_node_value
 Node value.
 $_attributes
 Node attributes.
 $_children
 Node children.

Detailed Description

Base class for helpers.

This class provides a default implementation for most axHelper methods.

Author:
Delespierre

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


Constructor & Destructor Documentation

axBaseHelper::__construct ( node_name,
attributes = array(),
node_value = null 
)

Constructor.

Parameters:
string$node_nameThe node name
array$attributes[optional] [default array()] The node attributes
mixed$node_value[optional] [default null] The node value

Reimplemented in axFormHelper, axInputHelper, and axSelectHelper.

Definition at line 51 of file axBaseHelper.class.php.


Member Function Documentation

axBaseHelper::__call ( method,
args 
)

__call implementation

Enable the use of axBaseHelper::setX() and axBaseHelper::getX() where X is an attribute of the current node. Will return the current instance for chaining purposes.

Parameters:
string$method
array$args
Returns:
axBaseHelper

Definition at line 92 of file axBaseHelper.class.php.

__toString implementation

Get a string represenation of current node and its children.

Returns:
string

Implements axHelper.

Reimplemented in axTableRowGroupHelper, and axTableHelper.

Definition at line 121 of file axBaseHelper.class.php.

Appends a node to current node and return it.

Parameters:
mixed$nodeAn axHelper instance or a string (or anything with a __toString implementation)
Returns:
mixed

Implements axHelper.

Reimplemented in axInputHelper, and axColHelper.

Definition at line 106 of file axBaseHelper.class.php.

Get the node's value (if any)

Returns:
mixed

Implements axHelper.

Reimplemented in axFormLineHelper, axSelectHelper, axOptionHelper, and axInputHelper.

Definition at line 78 of file axBaseHelper.class.php.

Reimplemented in axColHelper.

Definition at line 113 of file axBaseHelper.class.php.

axBaseHelper::setAttributes ( attributes)

Set any number of attributes at once.

See also:
Helper::setAttributes

Implements axHelper.

Definition at line 61 of file axBaseHelper.class.php.

axBaseHelper::setValue ( value)

Set the node's value.

Parameters:
mixed$value
Returns:
axHelper

Implements axHelper.

Reimplemented in axFormLineHelper, axCheckboxGroupHelper, axInputHelper, axSelectHelper, axColHelper, and axOptionHelper.

Definition at line 71 of file axBaseHelper.class.php.


Field Documentation

array axBaseHelper::$_attributes [protected]

Node attributes.

Definition at line 36 of file axBaseHelper.class.php.

array axBaseHelper::$_children [protected]

Node children.

Definition at line 42 of file axBaseHelper.class.php.

string axBaseHelper::$_node_name [protected]

Node name.

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

mixed axBaseHelper::$_node_value [protected]

Node value.

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


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