PHP 트레잇 Formo_ORM

파일 보기 프로젝트 열기: bmidget/kohana-formo

보호된 프로퍼티들

프로퍼티 타입 설명
$_foreign_keys mixed (default value: [])
$_formo_alias mixed Optional formo alias for form

공개 메소드들

메소드 설명
get_form ( array $fields, Formo $form = NULL ) : Formo Create a form from an ORM Model You can optionally pass a form to have fields added to
select_list ( mixed $result, mixed $key, mixed $value ) : array Utility method that just creates a array suitable for Formo opts from a result set

보호된 메소드들

메소드 설명
_field_exists ( $column )
_find_foreign_keys ( ) : void Fills $this->_foreign_keys in order to easier find foreign keys in all the process_type methods
_get_base_rules ( ) : array Apply rules based on mysql field definitions While you can skip these, it's a good idea to include them in your fields
_get_field_name ( ORM $model ) : string Convenience method for fetching the field name of a foreign model Formo allows
_process_belongs_to ( mixed $field_name, array &$options ) : void Add options to belongs_to fields
_process_enum ( mixed $field_name, array &$options ) : void Set up options for enum fields
_process_has_one ( mixed $field_name, array &$options ) : void Set up options for has_one relationships
_process_set ( mixed $field_name, array &$options ) : void Set up options for set fields
formo ( mixed $form ) : void Post-production after get_form

메소드 상세

_field_exists() 보호된 메소드

protected _field_exists ( $column )

_find_foreign_keys() 보호된 메소드

Fills $this->_foreign_keys in order to easier find foreign keys in all the process_type methods
protected _find_foreign_keys ( ) : void
리턴 void

_get_base_rules() 보호된 메소드

Apply rules based on mysql field definitions While you can skip these, it's a good idea to include them in your fields
protected _get_base_rules ( ) : array
리턴 array

_get_field_name() 보호된 정적인 메소드

Convenience method for fetching the field name of a foreign model Formo allows
protected static _get_field_name ( ORM $model ) : string
$model ORM
리턴 string

_process_belongs_to() 보호된 메소드

Add options to belongs_to fields
protected _process_belongs_to ( mixed $field_name, array &$options ) : void
$field_name mixed
$options array
리턴 void

_process_enum() 보호된 메소드

Set up options for enum fields
protected _process_enum ( mixed $field_name, array &$options ) : void
$field_name mixed
$options array
리턴 void

_process_has_one() 보호된 메소드

Set up options for has_one relationships
protected _process_has_one ( mixed $field_name, array &$options ) : void
$field_name mixed
$options array
리턴 void

_process_set() 보호된 메소드

Set up options for set fields
protected _process_set ( mixed $field_name, array &$options ) : void
$field_name mixed
$options array
리턴 void

formo() 보호된 메소드

Post-production after get_form
protected formo ( mixed $form ) : void
$form mixed
리턴 void

get_form() 공개 메소드

Create a form from an ORM Model You can optionally pass a form to have fields added to
public get_form ( array $fields, Formo $form = NULL ) : Formo
$fields array (default: NULL)
$form Formo (default: NULL)
리턴 Formo

select_list() 공개 정적인 메소드

Utility method that just creates a array suitable for Formo opts from a result set
public static select_list ( mixed $result, mixed $key, mixed $value ) : array
$result mixed
$key mixed
$value mixed
리턴 array

프로퍼티 상세

$_foreign_keys 보호되어 있는 프로퍼티

(default value: [])
protected mixed $_foreign_keys
리턴 mixed

$_formo_alias 보호되어 있는 프로퍼티

Optional formo alias for form
protected mixed $_formo_alias
리턴 mixed