PHP Class lithium\data\Schema

Inheritance: extends lithium\core\Object, implements ArrayAccess
ファイルを表示 Open project: unionofrad/lithium Class Usage Examples

Protected Properties

Property Type Description
$_autoConfig
$_fields
$_locked
$_meta
$_types

Public Methods

Method Description
__construct ( array $config = [] ) : void Constructor.
append ( array $fields ) : void Appends additional fields to the schema. Will not overwrite existing fields if any conflicts arise.
cast ( $object, $key, $data, array $options = [] )
defaults ( $name = null )
fields ( $name = null, $key = null )
has ( $field )
is ( string $condition, string $field ) : boolean Detects properties of a field, i.e. if it supports arrays.
merge ( object $schema ) : void Merges another Schema object into the current one.
meta ( $name = null )
names ( )
offsetExists ( $key )
offsetGet ( $key )
offsetSet ( $key, $value )
offsetUnset ( $key )
reset ( )
type ( $field )

Protected Methods

Method Description
_init ( )

Method Details

__construct() public method

Constructor.
public __construct ( array $config = [] ) : void
$config array Available configuration options are: - `'fields'` _array_
return void

_init() protected method

protected _init ( )

append() public method

Appends additional fields to the schema. Will not overwrite existing fields if any conflicts arise.
public append ( array $fields ) : void
$fields array New schema data.
return void

cast() public method

public cast ( $object, $key, $data, array $options = [] )
$options array

defaults() public method

public defaults ( $name = null )

fields() public method

public fields ( $name = null, $key = null )

has() public method

public has ( $field )

is() public method

Detects properties of a field, i.e. if it supports arrays.
public is ( string $condition, string $field ) : boolean
$condition string
$field string
return boolean

merge() public method

Merges another Schema object into the current one.
public merge ( object $schema ) : void
$schema object Another `Schema` class object to be merged into the current one. If this schema contains field names that conflict with existing field names, the existing fields will not be overwritten.
return void

meta() public method

public meta ( $name = null )

names() public method

public names ( )

offsetExists() public method

public offsetExists ( $key )

offsetGet() public method

public offsetGet ( $key )

offsetSet() public method

public offsetSet ( $key, $value )

offsetUnset() public method

public offsetUnset ( $key )

reset() public method

public reset ( )

type() public method

public type ( $field )

Property Details

$_autoConfig protected_oe property

protected $_autoConfig

$_fields protected_oe property

protected $_fields

$_locked protected_oe property

protected $_locked

$_meta protected_oe property

protected $_meta

$_types protected_oe property

protected $_types