PHP Class lithium\data\Schema

Inheritance: extends lithium\core\Object, implements ArrayAccess
Afficher le fichier Open project: unionofrad/lithium Class Usage Examples

Protected Properties

Свойство Type Description
$_autoConfig
$_fields
$_locked
$_meta
$_types

Méthodes publiques

Méthode 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 )

Méthodes protégées

Méthode Description
_init ( )

Method Details

__construct() public méthode

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

_init() protected méthode

protected _init ( )

append() public méthode

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.
Résultat void

cast() public méthode

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

defaults() public méthode

public defaults ( $name = null )

fields() public méthode

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

has() public méthode

public has ( $field )

is() public méthode

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

merge() public méthode

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.
Résultat void

meta() public méthode

public meta ( $name = null )

names() public méthode

public names ( )

offsetExists() public méthode

public offsetExists ( $key )

offsetGet() public méthode

public offsetGet ( $key )

offsetSet() public méthode

public offsetSet ( $key, $value )

offsetUnset() public méthode

public offsetUnset ( $key )

reset() public méthode

public reset ( )

type() public méthode

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