Tina4Stack  v1.0.1
The Tina4 Stack
htmlElement Class Reference
Inheritance diagram for htmlElement:

Public Member Functions

 __construct ()
 
 parseArgument ($arg)
 
 is_assoc ($array)
 
 __toString ()
 
 compileHTML ()
 
 compileAttributes ()
 
 compileContent ($acontent=null)
 
 templateHTML ($content, $object)
 
 __clone ()
 
 cloneChildren ($element)
 
 getContent ()
 
 setContent ($value)
 
 setInherited ()
 
 addContent ($value)
 
 byId ($keyName)
 
 bySearch ($keyName, $keyIndex)
 
 byClass ($keyName)
 
 byFor ($keyName)
 
 setAttribute ($keyName, $keyValue)
 
 cloneAttribute ($attribute)
 
 cloneContent ($content)
 
 addAttribute ($keyName, $keyValue)
 
 setTags ($openingTag, $closingTag, $compress=false)
 
 whenEqual ($args)
 
 whenLike ($args)
 
 whenOr ($args)
 
 whenAnd ($args)
 
 addDataSource ($name, $object)
 

Detailed Description

The basic shape element class to handle inheritance

The htmlElement class which handles the HTML compilation etc

Constructor & Destructor Documentation

htmlElement::__construct ( )

Constructor for HTMLElement

Member Function Documentation

htmlElement::__clone ( )

Cloning the Object

htmlElement::__toString ( )

Make HTML from the Object

Returns
String HTML returned from the compile
htmlElement::addAttribute (   $keyName,
  $keyValue 
)

Add Attributes to the Element

Parameters
type$keyName
type$keyValue
htmlElement::addContent (   $value)

Adding Content

Parameters
type$value
htmlElement::addDataSource (   $name,
  $object 
)

Add a datasource to the shape object for templating

Parameters
type$object
htmlElement::byClass (   $keyName)

Find and Element by Its HTML Class Example: p(["clas" => "Test"])

Parameters
type$keyName
Returns
htmlElement::byFor (   $keyName)
htmlElement::byId (   $keyName)

Find and Element by Its HTML Id Example: p(["id" => "Test"])

Parameters
type$keyName
Returns
htmlElement::bySearch (   $keyName,
  $keyIndex 
)

BySearch - internal function to find elements

htmlElement::cloneAttribute (   $attribute)

Clones a new attribute onto the child

Parameters
type$attribute
htmlElement::cloneChildren (   $element)

Clone All the Children

Parameters
type$element
htmlElement::cloneContent (   $content)

Clones content

Parameters
type$content
htmlElement::compileAttributes ( )

Compile all the Attributes

Returns
string
htmlElement::compileContent (   $acontent = null)

Compile the content for the Element

Parameters
type$acontent
Returns
type
htmlElement::compileHTML ( )

Compiling HTML

Returns
type
htmlElement::getContent ( )

Getting the content for the Element

Returns
type
htmlElement::is_assoc (   $array)

Function to check is an array is an associative or not

Parameters
type$array
Returns
type
htmlElement::parseArgument (   $arg)

Parse all the Arguments passed to the class, see if they are content or attributes

Parameters
type$arg
htmlElement::setAttribute (   $keyName,
  $keyValue 
)

Set attributes to the Element

Parameters
type$keyName
type$keyValue
htmlElement::setContent (   $value)

Setting Content

Parameters
type$value
htmlElement::setInherited ( )

Set inherited properties

htmlElement::setTags (   $openingTag,
  $closingTag,
  $compress = false 
)

Add Opening and Closing Tags

Parameters
type$openingTag
type$closingTag
htmlElement::templateHTML (   $content,
  $object 
)
htmlElement::whenAnd (   $args)

Function to evaluate a key value pair for any valid boolean expression, all evaluations should be true

Parameters
type$args
Returns
htmlElement::whenEqual (   $args)

Function to evaluate a key value pair for a IDENTICAL MATCH - if it is true it returns the current object

Parameters
type$args
Returns
htmlElement::whenLike (   $args)

Function to evaluate a key value pair for a LIKE MATCH - if it is true it returns the current object

Parameters
type$args
Returns
htmlElement::whenOr (   $args)

Function to evaluate a key value pair for any valid boolean expression, all evaluations should be true

Parameters
type$args
Returns

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