PHP Класс System\Database\record

Just another php framework
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$data array Holds the current record data
$prefix string The database table name prefix
$primary array The database table primary key
$table array The database table

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

Свойство Тип Описание
$cache array Save found objects for faster lookups

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

Метод Описание
__callStatic ( $method, $arguments ) : mixed Magic method for calling other Query methods
__construct ( $row = [] ) Create a new instance of the record class
__get ( $key ) : mixed Magic method for getting a item from the data array
__set ( $key, $value ) Magic method for setting a item in the data array
create ( $row ) : object Create a new instance of the record class for chaining
delete ( ) : integer Delete the record from the database
find ( $id ) : object Find a record by primary key and return a new Record object
populate ( $row ) Set the data array
save ( ) : integer Commit the data array to the database
update ( $id, $row ) : integer Commit data array to database matching the primary key

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

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

Magic method for calling other Query methods
public static __callStatic ( $method, $arguments ) : mixed
Результат mixed

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

Create a new instance of the record class
public __construct ( $row = [] )

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

Magic method for getting a item from the data array
public __get ( $key ) : mixed
Результат mixed

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

Magic method for setting a item in the data array
public __set ( $key, $value )

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

Create a new instance of the record class for chaining
public static create ( $row ) : object
Результат object

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

Delete the record from the database
public delete ( ) : integer
Результат integer Affected Row

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

Find a record by primary key and return a new Record object
public static find ( $id ) : object
Результат object Record

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

Set the data array
public populate ( $row )

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

Commit the data array to the database
public save ( ) : integer
Результат integer Affected Row

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

Commit data array to database matching the primary key
public static update ( $id, $row ) : integer
Результат integer Affected Row

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

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

Save found objects for faster lookups
protected static array $cache
Результат array

$data публичное свойство

Holds the current record data
public array $data
Результат array

$prefix публичное статическое свойство

The database table name prefix
public static string $prefix
Результат string

$primary публичное статическое свойство

The database table primary key
public static array $primary
Результат array

$table публичное статическое свойство

The database table
public static array $table
Результат array