PHP Класс Pop\Form\Fields

Автор: Nick Sagona, III ([email protected])
Наследование: implements ArrayAccess
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$fields array Fields array

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

Метод Описание
__construct ( mixed $fields = null, array $attribs = null, array $values = null, mixed $omit = null ) : Fields Constructor
__get ( string $name ) : mixed Get method to return the value of fields[$name].
__isset ( string $name ) : boolean Return the isset value of fields[$name].
__set ( string $name, mixed $value ) : void Set method to set the property to the value of fields[$name].
__unset ( string $name ) : void Unset fields[$name].
addFields ( array $fields ) : Fields Add form fields
addFieldsFromTable ( array $tableInfo, array $attribs = null, array $values = null, mixed $omit = null ) : Fields Add form fields from a related database table. The $tableInfo parameter should be the returned array result from calling the static Pop\Db\Record method, Record::getTableInfo();
factory ( mixed $fields = null, array $attribs = null, array $values = null, mixed $omit = null ) : Fields Static method to instantiate the fields object and return itself to facilitate chaining methods together.
getFields ( ) : array Get the form fields
setField ( string $field, mixed $attrib, mixed $value = null ) : Fields Set form field

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

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

Instantiate the fields object
public __construct ( mixed $fields = null, array $attribs = null, array $values = null, mixed $omit = null ) : Fields
$fields mixed
$attribs array
$values array
$omit mixed
Результат Fields

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

Get method to return the value of fields[$name].
public __get ( string $name ) : mixed
$name string
Результат mixed

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

Return the isset value of fields[$name].
public __isset ( string $name ) : boolean
$name string
Результат boolean

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

Set method to set the property to the value of fields[$name].
public __set ( string $name, mixed $value ) : void
$name string
$value mixed
Результат void

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

Unset fields[$name].
public __unset ( string $name ) : void
$name string
Результат void

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

Add form fields
public addFields ( array $fields ) : Fields
$fields array
Результат Fields

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

Add form fields from a related database table. The $tableInfo parameter should be the returned array result from calling the static Pop\Db\Record method, Record::getTableInfo();
public addFieldsFromTable ( array $tableInfo, array $attribs = null, array $values = null, mixed $omit = null ) : Fields
$tableInfo array
$attribs array
$values array
$omit mixed
Результат Fields

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

Static method to instantiate the fields object and return itself to facilitate chaining methods together.
public static factory ( mixed $fields = null, array $attribs = null, array $values = null, mixed $omit = null ) : Fields
$fields mixed
$attribs array
$values array
$omit mixed
Результат Fields

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

Get the form fields
public getFields ( ) : array
Результат array

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

Set form field
public setField ( string $field, mixed $attrib, mixed $value = null ) : Fields
$field string
$attrib mixed
$value mixed
Результат Fields

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

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

Fields array
protected array $fields
Результат array