PHP 클래스 BaseTable, DumbledORM

파일 보기 프로젝트 열기: jasonmoo/DumbledORM 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$changed
$data
$id
$meta
$meta_class
$meta_field
$pk
$relation_data
$relations
$table

공개 메소드들

메소드 설명
__call ( string $method, Array $params = [] ) : mixed most of the magic in here makes it all work - handles all getters and setters on columns and relations
__construct ( mixed $val = null ) construct object and load supplied data or fetch data by supplied id
addMeta ( array $data ) add an array of key/val to the metadata
create ( BaseTable $obj ) : BaseTable create an object with a defined relation to this one.
delete ( ) : void delete this object's record from self::$table and any associated meta data
find ( array $constraints ) : ResultSet search for any number of records in self::$table
getId ( ) : integer simple output object pk id
getMeta ( string $field ) : mixed get a field of metadata
hydrate ( array $data ) store supplied data and bring object state to current
one ( array $constraints ) : BaseTable search for single record in self::$table
save ( ) : void insert or update modified object data into self::$table and any associated metadata
select ( string $qs, mixed $params = null ) : ResultSet execute a query in self::$table
setMeta ( string $field, string $val ) set a field of metadata
toArray ( ) : Array simple output object data as array

비공개 메소드들

메소드 설명
_loadMeta ( ) : void internally fetch and load any associated metadata

메소드 상세

__call() 최종 공개 메소드

most of the magic in here makes it all work - handles all getters and setters on columns and relations
final public __call ( string $method, Array $params = [] ) : mixed
$method string
$params Array
리턴 mixed

__construct() 공개 메소드

construct object and load supplied data or fetch data by supplied id
public __construct ( mixed $val = null )
$val mixed

addMeta() 공개 메소드

add an array of key/val to the metadata
public addMeta ( array $data )
$data array

create() 최종 공개 메소드

create an object with a defined relation to this one.
final public create ( BaseTable $obj ) : BaseTable
$obj BaseTable
리턴 BaseTable

delete() 공개 메소드

delete this object's record from self::$table and any associated meta data
public delete ( ) : void
리턴 void

find() 최종 공개 정적인 메소드

search for any number of records in self::$table
final public static find ( array $constraints ) : ResultSet
$constraints array
리턴 ResultSet

getId() 최종 공개 메소드

simple output object pk id
final public getId ( ) : integer
리턴 integer

getMeta() 공개 메소드

get a field of metadata
public getMeta ( string $field ) : mixed
$field string
리턴 mixed

hydrate() 최종 공개 메소드

store supplied data and bring object state to current
final public hydrate ( array $data )
$data array

one() 최종 공개 정적인 메소드

search for single record in self::$table
final public static one ( array $constraints ) : BaseTable
$constraints array
리턴 BaseTable

save() 공개 메소드

insert or update modified object data into self::$table and any associated metadata
public save ( ) : void
리턴 void

select() 최종 공개 정적인 메소드

execute a query in self::$table
final public static select ( string $qs, mixed $params = null ) : ResultSet
$qs string
$params mixed
리턴 ResultSet

setMeta() 공개 메소드

set a field of metadata
public setMeta ( string $field, string $val )
$field string
$val string

toArray() 최종 공개 메소드

simple output object data as array
final public toArray ( ) : Array
리턴 Array

프로퍼티 상세

$changed 보호되어 있는 프로퍼티

protected $changed

$data 보호되어 있는 프로퍼티

protected $data

$id 보호되어 있는 프로퍼티

protected $id

$meta 보호되어 있는 프로퍼티

protected $meta

$meta_class 보호되어 있는 정적으로 프로퍼티

protected static $meta_class

$meta_field 보호되어 있는 정적으로 프로퍼티

protected static $meta_field

$pk 보호되어 있는 정적으로 프로퍼티

protected static $pk

$relation_data 보호되어 있는 프로퍼티

protected $relation_data

$relations 보호되어 있는 정적으로 프로퍼티

protected static $relations

$table 보호되어 있는 정적으로 프로퍼티

protected static $table