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

  • Authentication
  • Authentication_Token
  • AutoLoader
  • Cache
  • Charset
  • ClassDescriptor
  • Closure
  • Configuration
  • Controller
  • Converter
  • Date
  • Decoder
  • Delegate
  • Dispatcher
  • Encoder
  • Env
  • Env_Field
  • Env_File
  • Env_FileList
  • Env_Request
  • Env_SERVER
  • Exchange
  • Fault
  • Field
  • Filter
  • Filter_Value
  • Formatter
  • Hash
  • IP
  • Loader
  • Locale
  • Locale_Node
  • Log
  • Module
  • Module_Iterator
  • Nothing
  • Object
  • OS
  • Plugin
  • Profiler
  • Query
  • Registry
  • Resource
  • Server
  • Session
  • Session_Token
  • Set
  • Storage
  • Storage_Result
  • Storage_Statement
  • Stream
  • Translation
  • URI
  • URI_Parameters
  • UUID
  • Value
  • Version
  • View

Interfaces

  • Accessor
  • Chainable
  • Comparable
  • Configurable
  • Equality
  • Identity
  • Inquiry
  • Masquerade
  • Mutator
  • SeekableStream
  • Storable
  • Variator

Exceptions

  • Exception

Constants

  • Copyright
  • ProductName
  • Version

Class Formatter

A Formatter transforms arbitrary data sources into a generally readable format according to a chained data output interface (e.g. a view).

Core\Object implements Core\Chainable
Extended by Core\Set implements Core\Accessor
Extended by Core\Formatter

Direct known subclasses

Core\Formatter\Driver\coreuimarkup

Abstract
Namespace: Core
Package: Core\Formatter
Since: 3.1
Requires: PHP 5.3
Version: 1.0
Located at Formatter.inc.php

Methods summary

public static Core\Formatter
# autocreate( Core\URI $uri )

URI descriptor-based driver factory.

URI descriptor-based driver factory.

Parameters

$uri
Driver descriptor URI.

Returns

Core\Formatter

New formatter instance derived from Core\URI descriptor or null on error.

Since

3.1
public mixed
# __invoke( mixed $var )

Object invocation variant of Core\Formatter::format() method. To provide additional options, Core\Formatter::format() must be used instead.

Object invocation variant of Core\Formatter::format() method. To provide additional options, Core\Formatter::format() must be used instead.

Parameters

$var
Data to format.

Returns

mixed
Formatted data.

See

Core\Formatter::format()

Since

3.1
public boolean
# chain( Core\Chainable $object, array $flags = null )

Chains a successor formatter instance to this instance.

Chains a successor formatter instance to this instance.

Parameters

$object
Formatter instance to chain as successor.
$flags
See Chainable::chain() for standard flags.

Returns

boolean
true on success, otherwise false.

Throws

Core\Exception\InvalidArgument
Class of provided object is not supported.

Since

3.1

Overrides

Core\Object::chain
public mixed
# format( mixed $var, array $options = null )

Formats data depending on actual formatter implementation. If a formatter successor is chained to the instance, the result of the formatting operation is also processed by the succeeding formatter prior return.

Formats data depending on actual formatter implementation. If a formatter successor is chained to the instance, the result of the formatting operation is also processed by the succeeding formatter prior return.

Parameters

$var
Data to format.
$options
Hash of options for the specific formatter and successor in use.

Returns

mixed
Formatted data.

Since

3.1

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\Object

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

Properties summary

protected Core\Formatter $_v_successor

Subsequent (chained) formatter instance, if any.

Subsequent (chained) formatter instance, if any.

Since

3.1
#

Magic properties

public read-only Core\Formatter $successor

Subsequent (chained) formatter instance, if any.

Magic properties inherited from Core\Object

$hash, $uuid

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