PHP Класс Habari\QueryRecord

Наследование: implements habari\URLProperties
Показать файл Открыть проект

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

Свойство Тип Описание
$fields
$newfields Holds field values from db
$unsetfields Holds updated field values to commit to db

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

Метод Описание
__construct ( array $paramarray = [] ) constructor __construct Constructor for the QueryRecord class.
__get ( string $name ) : mixed function __get Handles getting virtual properties for this class
__isset ( string $name ) : boolean Magic isset for QueryRecord, returns whether a property value is set.
__set ( string $name, mixed $value ) : mixed function __set Handles setting virtual properties for this class
delete ( ) This is the public interface that deletes a record
exclude_fields ( mixed $fields ) Registers a (list of) fields(s) as being managed exclusively by the database.
get_raw_field ( string $name ) : mixed A field accessor that doesn't filter, for use in plugins that filter field values
get_url_args ( ) : array Returns an array with the current field settings
insert ( ) This is the public interface that inserts a record
jsonSerialize ( ) : string Implements JsonSerializable, only available in PHP 5.4 :(
list_excluded_fields ( ) : array returns an array of fields that should not be included in any database insert operation
modify ( $paramarray = [] ) This is the public interface to update a record with an array
to_array ( ) : array function to_array Returns an array with the current field settings
to_json ( ) : string Convert record data to json Returns a string with the current field values in JSON format
update ( ) This is the public interface that updates a record

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

Метод Описание
deleteRecord ( string $table, array $updatekeyfields ) : boolean function deleteRecord Deletes a record based on the match array
insertRecord ( string $table, null | array $schema = null ) : integer function insertRecord( Inserts this record's fields as a new row
updateRecord ( string $table, array $updatekeyfields = [], null | array $schema = null ) : boolean function updateRecord Updates this record's fields using the new data

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

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

constructor __construct Constructor for the QueryRecord class.
public __construct ( array $paramarray = [] )
$paramarray array an associative array of initial field values.

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

function __get Handles getting virtual properties for this class
public __get ( string $name ) : mixed
$name string Name of the property
Результат mixed The set value or null if none exists

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

Magic isset for QueryRecord, returns whether a property value is set.
public __isset ( string $name ) : boolean
$name string The name of the parameter
Результат boolean True if the value is set, false if not

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

function __set Handles setting virtual properties for this class
public __set ( string $name, mixed $value ) : mixed
$name string Name of the property
$value mixed Value to set it to
Результат mixed The set value

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

This is the public interface that deletes a record
public delete ( )

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

function deleteRecord Deletes a record based on the match array
protected deleteRecord ( string $table, array $updatekeyfields ) : boolean
$table string Table to delete from
$updatekeyfields array An associative array of field data to match
Результат boolean True on success, false if not

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

Registers a (list of) fields(s) as being managed exclusively by the database.
public exclude_fields ( mixed $fields )
$fields mixed A database field name (string) or an array of field names

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

A field accessor that doesn't filter, for use in plugins that filter field values
public get_raw_field ( string $name ) : mixed
$name string Name of the field to get
Результат mixed Value of the field, unfiltered

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

Returns an array with the current field settings
public get_url_args ( ) : array
Результат array The field settings as they would be saved

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

This is the public interface that inserts a record
public insert ( )

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

function insertRecord( Inserts this record's fields as a new row
protected insertRecord ( string $table, null | array $schema = null ) : integer
$table string Table to update, use table name without prefix and without braces
$schema null | array An array describing the schema of auxiliary tables
Результат integer The inserted record id on success, false if not Again, the parent class's method's signature must match that of the child class's signature

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

Implements JsonSerializable, only available in PHP 5.4 :(
public jsonSerialize ( ) : string
Результат string

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

returns an array of fields that should not be included in any database insert operation
public list_excluded_fields ( ) : array
Результат array an array of field names

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

This is the public interface to update a record with an array
public modify ( $paramarray = [] )

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

function to_array Returns an array with the current field settings
public to_array ( ) : array
Результат array The field settings as they would be saved

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

Convert record data to json Returns a string with the current field values in JSON format
public to_json ( ) : string
Результат string The field settings as they would be saved in JSON

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

This is the public interface that updates a record
public update ( )

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

function updateRecord Updates this record's fields using the new data
protected updateRecord ( string $table, array $updatekeyfields = [], null | array $schema = null ) : boolean
$table string Table to update, use table name without prefix and without braces
$updatekeyfields array An associative array of field data to match
$schema null | array An array describing the schema of auxiliary tables
Результат boolean True on success, false if not

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

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

protected $fields

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

Holds field values from db
protected $newfields

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

Holds updated field values to commit to db
protected $unsetfields