PHP Класс Formo_Core_Innards

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_alias mixed The field alias
$_attr mixed Array of HTML attributes
$_blueprint boolean (default value: false)
$_blueprint_count integer (default value: 0)
$_blueprint_dynamic boolean (default value: false)
$_blueprint_pks aray (default value=: array())
$_blueprint_template mixed Allow for setting custom blueprint template separate from blueprint
$_callbacks array (default value: array())
$_config array (default value: array())
$_construct_aliases array Used at construct for reconciling variables
$_driver mixed Field's driver name
$_editable boolean (default value: true)
$_errors array (default value: array())
$_fields array (default value: array())
$_filters array (default value: array())
$_ftype string Used for auto-loading config defaults
$_html mixed HTML instide a tag
$_label mixed (default value: self::NOTSET)
$_opts array (default value: array())
$_parent mixed Field's parent object
$_render boolean (default value: true)
$_rules array (default value: array())
$_single_tags array HTML tags that don't have a closing
$_to_array_attrs mixed List of attributes that get copied by default in Formo::to_array()
$_vals mixed Keep track of field's values
$_vars array (default value: array())

Открытые методы

Метод Описание
config ( mixed $param, mixed $default = NULL ) : void Find a config value.
range ( mixed $field, mixed $form ) : boolean Validation method that properly validates for html5 range

Защищенные методы

Метод Описание
_add_rule ( array $rule ) : void Add a rule to a field.
_add_rules_to_validation ( Validation $validation ) : void Add rules to a validation object.
_arr_dotsyntax ( array $array ) : array Convert a multidmensional array to dot-syntax key values
_attr_to_str ( ) : void Turn attributes array into a string.
_error_to_msg ( array $errors_array = NULL ) : string Convert an error returned from the Validation object to a formatted message
_get_files_array ( array $files ) : array Convert $_FILES array to one Formo understands
_get_label ( $label = NULL ) : string Return the formatted string for a field.
_get_val ( ) : void Return a field's value.
_get_var_name ( mixed $var ) : string For set() and get(), return the variable name being set, and gotten
_is_blueprint_def ( Formo $parent = NULL, $test = false ) : void Determine whether a field is paret of a blueprint definition
_load ( array $array ) : void Load values into the form
_make_id ( ) : void Make an id for a field that doesn't already have one
_merge ( mixed $name, array $array ) : void Merge an array of values with another array of values
_order ( mixed $field_alias, mixed $new_order, mixed $relative_field = NULL ) : void Internal method to reorder fields
_remove_rule ( mixed $rule ) : void Search for and remove a rule if it exists
_reset ( ) : Formo Reset field values to their original values
_resolve_construct_aliases ( mixed $array ) : void Allow non-associative arrays to define a new field
_resolve_namespaced_files ( array $files ) : array Convert namespaced $_FILES array into values Formo can understand
_run_callbacks ( mixed $type = NULL ) : void Internal method to run all applicable callbacks
_set_driver ( mixed $driver ) : void Set a field's driver
_set_id ( array &$array ) : void Set a field's id attribute if the auto_id config setting is TRUE
_set_val ( mixed $val, mixed $force_new = FALSE ) : void Set the field's value
_setup_from_ftype ( ) : void Default field definitions from config file

Описание методов

_add_rule() защищенный Метод

Add a rule to a field.
protected _add_rule ( array $rule ) : void
$rule array
Результат void

_add_rules_to_validation() защищенный Метод

Add rules to a validation object.
protected _add_rules_to_validation ( Validation $validation ) : void
$validation Validation
Результат void

_arr_dotsyntax() защищенный Метод

Convert a multidmensional array to dot-syntax key values
protected _arr_dotsyntax ( array $array ) : array
$array array
Результат array

_attr_to_str() защищенный Метод

Turn attributes array into a string.
protected _attr_to_str ( ) : void
Результат void

_error_to_msg() защищенный Метод

Convert an error returned from the Validation object to a formatted message
protected _error_to_msg ( array $errors_array = NULL ) : string
$errors_array array (default: NULL)
Результат string

_get_files_array() защищенный Метод

Convert $_FILES array to one Formo understands
protected _get_files_array ( array $files ) : array
$files array
Результат array

_get_label() защищенный Метод

Return the formatted string for a field.
protected _get_label ( $label = NULL ) : string
Результат string

_get_val() защищенный Метод

Return a field's value.
protected _get_val ( ) : void
Результат void

_get_var_name() защищенный Метод

For set() and get(), return the variable name being set, and gotten
protected _get_var_name ( mixed $var ) : string
$var mixed
Результат string

_is_blueprint_def() защищенный Метод

Determine whether a field is paret of a blueprint definition
protected _is_blueprint_def ( Formo $parent = NULL, $test = false ) : void
$parent Formo (default: FALSE)
Результат void

_load() защищенный Метод

Load values into the form
protected _load ( array $array ) : void
$array array
Результат void

_make_id() защищенный Метод

Make an id for a field that doesn't already have one
protected _make_id ( ) : void
Результат void

_merge() защищенный Метод

Merge an array of values with another array of values
protected _merge ( mixed $name, array $array ) : void
$name mixed
$array array
Результат void

_order() защищенный Метод

Internal method to reorder fields
protected _order ( mixed $field_alias, mixed $new_order, mixed $relative_field = NULL ) : void
$field_alias mixed
$new_order mixed
$relative_field mixed (default: NULL)
Результат void

_remove_rule() защищенный Метод

Search for and remove a rule if it exists
protected _remove_rule ( mixed $rule ) : void
$rule mixed
Результат void

_reset() защищенный Метод

Reset field values to their original values
protected _reset ( ) : Formo
Результат Formo obj

_resolve_construct_aliases() защищенный Метод

Allow non-associative arrays to define a new field
protected _resolve_construct_aliases ( mixed $array ) : void
$array mixed
Результат void

_resolve_namespaced_files() защищенный Метод

Convert namespaced $_FILES array into values Formo can understand
protected _resolve_namespaced_files ( array $files ) : array
$files array
Результат array

_run_callbacks() защищенный Метод

Internal method to run all applicable callbacks
protected _run_callbacks ( mixed $type = NULL ) : void
$type mixed (default: NULL)
Результат void

_set_driver() защищенный Метод

Set a field's driver
protected _set_driver ( mixed $driver ) : void
$driver mixed
Результат void

_set_id() защищенный Метод

Set a field's id attribute if the auto_id config setting is TRUE
protected _set_id ( array &$array ) : void
$array array
Результат void

_set_val() защищенный Метод

Set the field's value
protected _set_val ( mixed $val, mixed $force_new = FALSE ) : void
$val mixed
$force_new mixed (default: FALSE)
Результат void

_setup_from_ftype() защищенный Метод

Default field definitions from config file
protected _setup_from_ftype ( ) : void
Результат void

config() публичный Метод

Find a config value.
public config ( mixed $param, mixed $default = NULL ) : void
$param mixed
$default mixed (default: NULL)
Результат void

range() публичный статический Метод

Validation method that properly validates for html5 range
public static range ( mixed $field, mixed $form ) : boolean
$field mixed
$form mixed
Результат boolean

Описание свойств

$_alias защищенное свойство

The field alias
protected mixed $_alias
Результат mixed

$_attr защищенное свойство

Array of HTML attributes
protected mixed $_attr
Результат mixed

$_blueprint защищенное свойство

(default value: false)
protected bool $_blueprint
Результат boolean

$_blueprint_count защищенное свойство

(default value: 0)
protected int $_blueprint_count
Результат integer

$_blueprint_dynamic защищенное свойство

(default value: false)
protected bool $_blueprint_dynamic
Результат boolean

$_blueprint_pks защищенное свойство

(default value=: array())
protected aray $_blueprint_pks
Результат aray

$_blueprint_template защищенное свойство

Allow for setting custom blueprint template separate from blueprint
protected mixed $_blueprint_template
Результат mixed

$_callbacks защищенное свойство

(default value: array())
protected array $_callbacks
Результат array

$_config защищенное свойство

(default value: array())
protected array $_config
Результат array

$_construct_aliases защищенное статическое свойство

Used at construct for reconciling variables
protected static array $_construct_aliases
Результат array

$_driver защищенное свойство

Field's driver name
protected mixed $_driver
Результат mixed

$_editable защищенное свойство

(default value: true)
protected bool $_editable
Результат boolean

$_errors защищенное свойство

(default value: array())
protected array $_errors
Результат array

$_fields защищенное свойство

(default value: array())
protected array $_fields
Результат array

$_filters защищенное свойство

(default value: array())
protected array $_filters
Результат array

$_ftype защищенное свойство

Used for auto-loading config defaults
protected string $_ftype
Результат string

$_html защищенное свойство

HTML instide a tag
protected mixed $_html
Результат mixed

$_label защищенное свойство

(default value: self::NOTSET)
protected mixed $_label
Результат mixed

$_opts защищенное свойство

(default value: array())
protected array $_opts
Результат array

$_parent защищенное свойство

Field's parent object
protected mixed $_parent
Результат mixed

$_render защищенное свойство

(default value: true)
protected bool $_render
Результат boolean

$_rules защищенное свойство

(default value: array())
protected array $_rules
Результат array

$_single_tags защищенное статическое свойство

HTML tags that don't have a closing
protected static array $_single_tags
Результат array

$_to_array_attrs защищенное статическое свойство

List of attributes that get copied by default in Formo::to_array()
protected static mixed $_to_array_attrs
Результат mixed

$_vals защищенное свойство

Keep track of field's values
protected mixed $_vals
Результат mixed

$_vars защищенное свойство

(default value: array())
protected array $_vars
Результат array