PHP 클래스 System\Database\record

Just another php framework
파일 보기 프로젝트 열기: anchorcms/anchor-cms

공개 프로퍼티들

프로퍼티 타입 설명
$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

보호된 프로퍼티들

프로퍼티 타입 설명
$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