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

Namespaces

  • Core
    • Authentication
      • Auto
        • Driver
      • Driver
    • Cache
      • Driver
    • Charset
      • Driver
    • Configuration
    • Controller
    • Converter
      • Driver
    • Decoder
      • Driver
    • Encoder
      • Driver
    • Env
      • Authentication
      • Locale
      • Proxy
      • Server
        • HTTP
        • Redirect
        • X
    • Exception
    • Exchange
      • 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
    • 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
  • 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_Iterator
  • 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
  • String
  • 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
  • UseVersion
  • Version

Functions

  • ns_expand
  • ns_file_exists
  • ns_get_version
  • ns_resolve

Class Converter

A Converter takes a constant data source and returns a transformed value. The interface is very similar to an Encoder or Decoder, but a Converter is not designed to work on streaming data sources. Additionally, the performed transformation is in general not reversible.

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

Direct known subclasses

Core\Converter\Driver\vardump

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

Methods summary

public mixed
# __invoke( mixed $value )

Object invocation to convert a value.

Object invocation to convert a value.

Parameters

$value

Value to convert. May accept additional parameters depending on the converter in use.

Returns

mixed
Converted value.

Since

3.0
public static Core\Converter
# autocreate( Core\URI $uri )

Converter factory.

Converter factory.

Parameters

$uri
Driver configuration URI.

Returns

Core\Converter

Since

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

Connects another object to the current object. Usage depends on the actual class implementation; common examples are lazy configuration completion or layer expansions. Allows chaining of a successor Converter (at end of chain or replace with corresponding flag set) instance or an Inquiry data source.

Connects another object to the current object. Usage depends on the actual class implementation; common examples are lazy configuration completion or layer expansions. Allows chaining of a successor Converter (at end of chain or replace with corresponding flag set) instance or an Inquiry data source.

Parameters

$object
Object to chain to instance.
$flags

Optional array of additional chain flags. Usage depends on the actual chain implementation.

Returns

integer|boolean
Returns a non-zero value on success, otherwise false.

Throws

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

Since

3.0

Overrides

Core\Object::chain
public mixed
# convert( mixed $value )

Converts the input.

Converts the input.

Parameters

$value

Value to convert. May accept additional parameters depending on the converter in use.

Returns

mixed
Converted value.

Since

3.0
public mixed
# getDataForUndefinedKey( string $key )

Retrieves a value from the assigned data source and converts it automatically.

Retrieves a value from the assigned data source and converts it automatically.

Parameters

$key
Key of value to fetch and convert.

Returns

mixed
Converted value for $key.

Throws

Core\Exception\UndefinedKey
No data source assigned to converter.

Since

3.0

Overrides

Core\Field::getDataForUndefinedKey

Methods inherited from Core\Field

getDataForKey(), getDataForKeys(), issetDataForKey(), offsetExists(), offsetGet(), offsetSet(), offsetUnset()

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

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

Properties summary

protected Core\Inquiry $_v_dataSource

Assigned data source (an Inquiry), if any.

Assigned data source (an Inquiry), if any.

Since

3.0
#
protected Core\Converter $_v_successor

Subsequent (chained) converter layer, if any.

Subsequent (chained) converter layer, if any.

Since

3.0
#

Properties inherited from Core\Field

$_v_data

Magic properties

public read-only Core\Inquiry $dataSource

Assigned data source.

public read-only Core\Converter $successor

Chained successor converter.

Magic properties inherited from Core\Field

$data

Magic properties inherited from Core\Object

$hash, $uuid

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