xplo.re Medusa Core Framework 3.2
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Event
  • Todo
  • Download

Namespaces

  • Core
    • Authentication
      • Auto
        • Driver
      • Driver
    • Cache
      • Driver
    • Charset
      • Driver
    • Configuration
      • Driver
    • Controller
    • Converter
      • Driver
    • Decoder
      • Driver
    • Encoder
      • Driver
    • Env
      • Authentication
      • Locale
      • Proxy
      • Server
        • HTTP
        • Redirect
        • X
    • Exception
    • Exchange
      • Driver
    • Fault
      • Formatter
        • Driver
      • Incident
        • Exception
      • Reporter
        • Driver
    • Field
    • Filter
      • Driver
    • Formatter
      • Driver
        • coreuimarkup
          • Token
    • Hash
    • Loader
    • Locale
    • Log
      • Driver
    • Module
      • Dependency
        • Requirement
          • Core
          • PHP
      • Linkage
        • Driver
    • PDF
    • Plugin
    • Query
      • Driver
    • Server
      • Driver
    • Session
      • Driver
    • Set
    • Storage
      • Driver
      • Field
        • Element
    • Stream
      • Driver
    • String
    • Translation
      • Driver
      • Language
        • Driver
    • Type
    • URI
      • Driver
    • Version
    • View
      • Driver
        • coreui
          • Control
            • Button
            • Table
          • Element
        • htmlbuilder
          • Tags
        • yui
          • Modules
  • None
  • PHP

Classes

  • coreui
  • html
  • htmlbuilder
  • plain
  • yui

Class htmlbuilder

Builder proxy view for HTML-based outputs.

Core\Object implements Core\Chainable
Extended by Core\Set implements Core\Accessor
Extended by Core\Set\Mutable implements Core\Mutator
Extended by Core\Field implements Core\Inquiry
Extended by Core\Field\Mutable implements Core\Variator
Extended by Core\View
Extended by Core\View\Driver\html
Extended by Core\View\Driver\htmlbuilder
Namespace: Core\View\Driver
Package: Core\View\HTMLBuilder
Since: 3.0
Requires: PHP 5.3
Version: 1.0
Located at View/Driver/htmlbuilder.inc.php

Methods summary

public
# __construct( Core\URI $uri )

Initialises a new View instance. Sets the HTML encoder as the default encoder if no encoder is specified in the URI. Sets the HTML encoder as the default encoder if no encoder is specified in the driver configuration URI.

Initialises a new View instance. Sets the HTML encoder as the default encoder if no encoder is specified in the URI. Sets the HTML encoder as the default encoder if no encoder is specified in the driver configuration URI.

Parameters

$uri
Driver configuration URI.

Since

3.0

Overrides

Core\View\Driver\html::__construct
public Core\View\Driver\htmlbuilder\Node
# append( string|Core\View\Driver\htmlbuilder\Node $elementID )

Appends a node to the internal node buffer and returns a reference to the node instance.

Appends a node to the internal node buffer and returns a reference to the node instance.

Parameters

$elementID

Description string of new HTML node or reference to an existing HTML builder node. If a string is passed, a new node is created by delegating the description string to the Core\View\Driver\htmlbuilder::spawn() method. The resulting or provided node is added to the internal nodes array.

Returns

Core\View\Driver\htmlbuilder\Node
Reference to added node instance.

Since

3.0

Overrides

Core\View\Driver\html::append
public
# appendVerbatim( mixed $data )

Adds an arbitrary object or string verbatim (without encoding) to the internal nodes array.

Adds an arbitrary object or string verbatim (without encoding) to the internal nodes array.

Parameters

$data

Object or string to append verbatim to the internal nodes array. If a reference to an object is provided, the object must support a to-string conversion, otherwise view rendering will fail with a fatal error.

Since

3.0
public
# clear( )

Resets the internal nodes array to an empty array.

Resets the internal nodes array to an empty array.

Since

3.1

Overrides

Core\View\Driver\html::clear
public string
# concatArray( string $elementID, array $dataArray )

Returns a concatenated set of nodes based on the same description string but different data sets.

Returns a concatenated set of nodes based on the same description string but different data sets.

Parameters

$elementID

Node description string used in spawning a node for each data array entry.

$dataArray
Array of HTML node data sets.

Returns

string

Concatenated node set. Nodes are concatenated in the same order as their data sets appear in the data array parameter.

Since

3.0
public boolean
# render( )

Renders the internal node array by converting each node into a string and echoing it to the standard output.

Renders the internal node array by converting each node into a string and echoing it to the standard output.

Returns

boolean

Since

3.0

Overrides

Core\View\Driver\html::render
public Core\View\Driver\htmlbuilder\Tags\SCRIPT
# script( string $type = null )

Returns a new SCRIPT node of a given type.

Returns a new SCRIPT node of a given type.

Parameters

$type
Type of SCRIPT node to create.

Returns

Core\View\Driver\htmlbuilder\Tags\SCRIPT

Since

3.0
public Core\View\Driver\htmlbuilder\Node
# spawn( string $elementID )

Spawns a new HTML node with reference to this view proxy.

Spawns a new HTML node with reference to this view proxy.

Parameters

$elementID

Description string of new HTML node. See Core\View\Driver\Node::derive() for details on the format of a description string.

Returns

Core\View\Driver\htmlbuilder\Node
Reference to new HTML node.

See

Node::derive()

Since

3.0
public
# setDataForUndefinedKey( string $key, mixed $value )

Adds a KDC value to the view. Additionally, if the key is the empty string, the value is added to the internal HTML buffer. This allows the use of the array-append operator to append values to the internal HTML buffer verbatim. Additionally, if the given key is the empty string, the new value is added to the internal node set. This enables the use of the array-append operator to append values to the internal node set verbatim.

Adds a KDC value to the view. Additionally, if the key is the empty string, the value is added to the internal HTML buffer. This allows the use of the array-append operator to append values to the internal HTML buffer verbatim. Additionally, if the given key is the empty string, the new value is added to the internal node set. This enables the use of the array-append operator to append values to the internal node set verbatim.

Parameters

$key
Data field key.
$value
Value to store.

Throws

Exception\UndefinedKey
No data field identified by the given key exists.

Since

3.0

Overrides

Core\View\Driver\html::setDataForUndefinedKey

Methods inherited from Core\View\Driver\html

setResponseCode()

Methods inherited from Core\View

autocreate(), chain(), derive(), encode(), encoder(), uri(), url()

Methods inherited from Core\Field\Mutable

offsetSet(), offsetUnset(), setDataForKey(), setDataForKeys(), setKeyMasquerade(), updateMasqueradedKeys()

Methods inherited from Core\Field

getDataForKey(), getDataForKeys(), getDataForUndefinedKey(), issetDataForKey(), offsetExists(), offsetGet()

Methods inherited from Core\Set\Mutable

__set(), __unset()

Methods inherited from Core\Set

__get(), __isset()

Methods inherited from Core\Object

__autocreateFactory(), __call(), __processParameters(), __toString(), attachMethod(), getValueForKey(), getValueForKeyPath(), getValueForUndefinedKey(), hash(), issetValueForKey(), setValueForKey(), setValueForKeyPath(), setValueForUndefinedKey(), uuid()

Constants summary

Constants inherited from Core\View

EncoderParameter

Constants inherited from Core\Object

AnyParameterType, AutochainParameterType, AutocreateParameterType, BooleanParameterType, CharParameterType, EnumParameterType, IntegerParameterType, RealParameterType, StringParameterType, UserParameterType

Properties summary

protected array $_v_nodes

Array of HTML nodes appended to this view.

Array of HTML nodes appended to this view.

Since

3.0
# array ()

Properties inherited from Core\View\Driver\html

$_v_buffer, $_v_responseCode, $_v_responseCodes

Properties inherited from Core\View

$_encoder, $_v_parameters, $_v_proxy, $_v_renderers, $_v_translator, $_v_uri

Properties inherited from Core\Field\Mutable

$_v_masqueradedKeys

Properties inherited from Core\Field

$_v_data

Magic properties

public read-only array $nodes

Array of HTML nodes appended to this view.

Magic properties inherited from Core\View\Driver\html

$buffer, $responseCode

Magic properties inherited from Core\View

$encoder, $parameters, $proxy, $renderers, $translator, $uri

Magic properties inherited from Core\Field\Mutable

$masqueradedKeys

Magic properties inherited from Core\Field

$data

Magic properties inherited from Core\Object

$hash, $uuid

xplo.re Medusa Core Framework 3.2 API documentation generated by ApiGen