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

  • B
  • H2
  • H3
  • H4
  • H5
  • H6
  • I
  • LineBreak
  • P
  • Template
  • TT
  • UL
  • URL
  • Variable

Class Variable

Variables are special tokens that can be set explicitly with each formatting call.

Optionally can a dictionary of variable values be provided that is automatically passed on to this token.

Core\Object implements Core\Chainable
Extended by Core\Set implements Core\Accessor
Extended by Core\Formatter\Driver\coreuimarkup\Token
Extended by Core\Formatter\Driver\coreuimarkup\Token\Variable
Namespace: Core\Formatter\Driver\coreuimarkup\Token
Package: CoreUI\Markup\Token
Since: 3.1
Requires: PHP 5.3
Version: 1.0
Located at Formatter/Driver/coreuimarkup/Token/Variable.inc.php

Methods summary

public
# __construct( Core\Formatter $formatter )

Initialises variable token instance.

Initialises variable token instance.

Parameters

$formatter
Reference to the formatter instance that initialises the token.

Since

3.1

Overrides

Core\Formatter\Driver\coreuimarkup\Token::__construct
public string[]
# captures( )

Returns a hash of regular expressions and handlers processed by this token instance.

Returns a hash of regular expressions and handlers processed by this token instance.

Returns

string[]

Hash with regular expressions as keys and their handlers as values. A handler is a hash with unique capture names as keys and their corresponding callbacks to handle the capture as values. Regular expressions must use named captures that match the handler hash keys.

Since

3.1
public string
# format( string $variable )

Formats a captured variable.

Formats a captured variable.

Parameters

$variable
Name of variable to format.

Returns

string
Formatted variable.

Since

3.1
public string
# handleCapture( string $key, string $fragment, array $match )

Formats markup parser captures.

Formats markup parser captures.

Parameters

$key
Key of capture token.
$fragment
Captured text fragment.
$match
Hash of match captures.

Returns

string
Formatted text fragment.

Since

3.1
public
# setDefaultHandler( callable $callback )

Sets the default variable handler.

Sets the default variable handler.

Parameters

$callback
Callback to invoke on non-registered variables.

Returns


$this Reference to this instance.

Since

3.1
public
# setDictionary( array $dictionary )

Sets the variable dictionary.

Sets the variable dictionary.

Parameters

$dictionary
Dictionary of variable names and their values.

Returns


$this Reference to this instance.

Since

3.1

Methods inherited from Core\Set

__get(), __isset()

Methods inherited from Core\Object

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

Constants summary

Constants inherited from Core\Object

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

Properties summary

protected callable $_v_defaultHandler

Default handler invoked for undefined variables.

Default handler invoked for undefined variables.

Since

3.1
#
protected array $_v_dictionary

Dictionary of variables and their respective values.

Dictionary of variables and their respective values.

Since

3.1
#

Properties inherited from Core\Formatter\Driver\coreuimarkup\Token

$_v_formatter

Magic properties

public read-only callable $defaultHandler

Default handler invoked for undefined variables.

public read-only array $dictionary

Dictionary of variables and their respective values.

Magic properties inherited from Core\Formatter\Driver\coreuimarkup\Token

$formatter

Magic properties inherited from Core\Object

$hash, $uuid

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