PHP Class System\Database\record

Just another php framework
Datei anzeigen Open project: anchorcms/anchor-cms

Public Properties

Property 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

Property Type Description
$cache array Save found objects for faster lookups

Public Methods

Method 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 method

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

__construct() public method

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

__get() public method

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

__set() public method

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

create() public static method

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

delete() public method

Delete the record from the database
public delete ( ) : integer
return integer Affected Row

find() public static method

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

populate() public method

Set the data array
public populate ( $row )

save() public method

Commit the data array to the database
public save ( ) : integer
return integer Affected Row

update() public static method

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

Property Details

$cache protected_oe static_oe property

Save found objects for faster lookups
protected static array $cache
return array

$data public_oe property

Holds the current record data
public array $data
return array

$prefix public_oe static_oe property

The database table name prefix
public static string $prefix
return string

$primary public_oe static_oe property

The database table primary key
public static array $primary
return array

$table public_oe static_oe property

The database table
public static array $table
return array