PHP Class System\Database\record

Just another php framework
Afficher le fichier Open project: anchorcms/anchor-cms

Méthodes publiques

Свойство Type Description
$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 Properties

Свойство Type Description
$cache array Save found objects for faster lookups

Méthodes publiques

Méthode Description
__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

Method Details

__callStatic() public static méthode

Magic method for calling other Query methods
public static __callStatic ( $method, $arguments ) : mixed
Résultat mixed

__construct() public méthode

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

__get() public méthode

Magic method for getting a item from the data array
public __get ( $key ) : mixed
Résultat mixed

__set() public méthode

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

create() public static méthode

Create a new instance of the record class for chaining
public static create ( $row ) : object
Résultat object

delete() public méthode

Delete the record from the database
public delete ( ) : integer
Résultat integer Affected Row

find() public static méthode

Find a record by primary key and return a new Record object
public static find ( $id ) : object
Résultat object Record

populate() public méthode

Set the data array
public populate ( $row )

save() public méthode

Commit the data array to the database
public save ( ) : integer
Résultat integer Affected Row

update() public static méthode

Commit data array to database matching the primary key
public static update ( $id, $row ) : integer
Résultat integer Affected Row

Property Details

$cache protected_oe static_oe property

Save found objects for faster lookups
protected static array $cache
Résultat array

$data public_oe property

Holds the current record data
public array $data
Résultat array

$prefix public_oe static_oe property

The database table name prefix
public static string $prefix
Résultat string

$primary public_oe static_oe property

The database table primary key
public static array $primary
Résultat array

$table public_oe static_oe property

The database table
public static array $table
Résultat array