PHP Класс Ulaform_Driver_Sql, horde

Copyright 2003-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
Автор: Marko Djukic ([email protected])
Автор: Vilius Šumskas ([email protected])
Наследование: extends Ulaform_Driver
Показать файл Открыть проект

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

Свойство Тип Описание
$_charset string Charset
$_db Horde_Db_Adapter The database connection object.

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

Метод Описание
__construct ( array $params = [] ) Construct a new SQL storage object.
deleteField ( integer $field_id ) : boolean Deletes a field from the database.
deleteForm ( integer $form_id ) : boolean Deletes a form and all of its fields from the database.
getAvailableForms ( ) : array Fetches the a list of available forms to use.
getFields ( integer $form_id, $field_id = null ) : array Fetches the fields for a particular form.
getForm ( integer $form_id, $permission = Horde_Perms::SHOW ) : array Fetches all the data specific to the supplied form id.
getForms ( $form_id = null ) : array Fetches the a list of available forms and the basic data.
saveField ( &$info ) : boolean Saves the passed field into the db, either inserting a new field if no field_id is available, or updating an existing field if a field_id has been passed.
saveForm ( array &$info ) : integer Saves the passed form into the db, either inserting a new form if no form_id is available, or updating an existing form if a form_id has been passed.
sortFields ( array &$info ) : boolean Sets the specified sort order to the fields in a form.

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

Метод Описание
_nextFieldOrder ( integer $form_id ) : integer Gets the next field order position within a form.

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

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

Construct a new SQL storage object.
public __construct ( array $params = [] )
$params array The connection parameters

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

Gets the next field order position within a form.
protected _nextFieldOrder ( integer $form_id ) : integer
$form_id integer
Результат integer

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

Deletes a field from the database.
public deleteField ( integer $field_id ) : boolean
$field_id integer The field id of the field to delete.
Результат boolean True on success.

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

Deletes a form and all of its fields from the database.
public deleteForm ( integer $form_id ) : boolean
$form_id integer The form id of the form to delete.
Результат boolean True on success.

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

Fetches the a list of available forms to use.
public getAvailableForms ( ) : array
Результат array An array of the available forms.

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

Fetches the fields for a particular form.
public getFields ( integer $form_id, $field_id = null ) : array
$form_id integer The form id of the form to return.
Результат array The fields.

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

Fetches all the data specific to the supplied form id.
public getForm ( integer $form_id, $permission = Horde_Perms::SHOW ) : array
$form_id integer The form id of the form to return.
Результат array The form data.

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

Fetches the a list of available forms and the basic data.
public getForms ( $form_id = null ) : array
Результат array An array of the available forms.

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

If no form_id is available will throw an exception.
public saveField ( &$info ) : boolean
Результат boolean True on success.

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

Saves the passed form into the db, either inserting a new form if no form_id is available, or updating an existing form if a form_id has been passed.
public saveForm ( array &$info ) : integer
$info array An array with the form details.
Результат integer The form id.

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

Sets the specified sort order to the fields in a form.
public sortFields ( array &$info ) : boolean
$info array An array with the field ids in a specific order.
Результат boolean True on success.

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

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

Charset
protected string $_charset
Результат string

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

The database connection object.
protected Horde_Db_Adapter $_db
Результат Horde_Db_Adapter