PHP Class Hive_Meta, hive

Author: Woody Gilk ([email protected])
Mostrar archivo Open project: shadowhand/hive

Public Properties

Property Type Description
$aliases model aliases: name => function, ...
$callbacks callbacks by field: name => callback list, ...
$db database instance or instance name
$fields model fields: name => field object, ...
$filters filters by field: name => filter list, ...
$relations model relations: name => relation object, ...
$rules rules by field: name => filter list, ...
$sorting row sorting fields: name => direction, ...
$table database table
$validate validation context: context => field list, ...

Public Methods

Method Description
alias ( $name ) : mixed Get the complete column alias for a field.
column ( $name ) : string Get the complete column name for a field.
field ( $name ) : Hive_Field Get a single field object.
finish ( ) Finishes the initialization of meta.
is_unique ( $array, $name ) : void [Validate] callback, used to test if a field value is unique.
relation ( $name ) : Hive_Relation Get a single relation object.

Method Details

alias() public method

$alias = $meta->alias('foo');
public alias ( $name ) : mixed
return mixed

column() public method

$column = $meta->column('foo');
public column ( $name ) : string
return string

field() public method

$id = $meta->field('id');
public field ( $name ) : Hive_Field
return Hive_Field

finish() public method

$meta->finish();
public finish ( )

is_unique() public method

$data->callback($name, array($meta, 'is_unique'));
public is_unique ( $array, $name ) : void
return void

relation() public method

$other = $meta->relation('thing');
public relation ( $name ) : Hive_Relation
return Hive_Relation

Property Details

$aliases public_oe property

model aliases: name => function, ...
public $aliases

$callbacks public_oe property

callbacks by field: name => callback list, ...
public $callbacks

$db public_oe property

database instance or instance name
public $db

$fields public_oe property

model fields: name => field object, ...
public $fields

$filters public_oe property

filters by field: name => filter list, ...
public $filters

$relations public_oe property

model relations: name => relation object, ...
public $relations

$rules public_oe property

rules by field: name => filter list, ...
public $rules

$sorting public_oe property

row sorting fields: name => direction, ...
public $sorting

$table public_oe property

database table
public $table

$validate public_oe property

validation context: context => field list, ...
public $validate