PHP 클래스 SQL_Relation, atk4

상속: extends AbstractModel
파일 보기 프로젝트 열기: atk4/atk4

공개 프로퍼티들

프로퍼티 타입 설명
$delete_behaviour
$dsql
$expr Join kind (left|right|inner|cross etc.)
$f1
$f2 Using expression when joining
$fa Master field
$id
$m1 short name / field alias ?
$m2 Foreign field
$owner SQL_Model
$relation $m1 == $relation->f1
$t short_name = Foreign alias
$table_alias cascade, setnull, ignore

공개 메소드들

메소드 설명
addField ( $n, $actual_field = null ) Second argument to addField() will specify how the field is really called
afterDelete ( $m )
afterInsert ( $m, $id )
afterLoad ( $m )
afterUnload ( $m )
beforeDelete ( $m, $id )
beforeInsert ( $m, $q )
beforeLoad ( $m, $q = null ) Add query for the relation's ID, but then remove it from results. Remove ID when unloading.
beforeModify ( $m, $q )
beforeSave ( $m )
fieldExpr ( $f )
hasMany ( $model, $their_field = null, $our_field = null, $as_field = null )
hasOne ( $model, $our_field = null, $display_field = null )
init ( ) }}}
join ( $foreign_table, $master_field = null, $join_kind = null, $_foreign_alias = null )
leftJoin ( $foreign_table, $master_field = null, $join_kind = null, $_foreign_alias = null )
set ( $foreign_table, $master_field = null, $join_kind = null, $relation = null ) TODO: hasMany()

메소드 상세

addField() 공개 메소드

Second argument to addField() will specify how the field is really called
public addField ( $n, $actual_field = null )

afterDelete() 공개 메소드

public afterDelete ( $m )

afterInsert() 공개 메소드

public afterInsert ( $m, $id )

afterLoad() 공개 메소드

public afterLoad ( $m )

afterUnload() 공개 메소드

public afterUnload ( $m )

beforeDelete() 공개 메소드

public beforeDelete ( $m, $id )

beforeInsert() 공개 메소드

public beforeInsert ( $m, $q )

beforeLoad() 공개 메소드

Add query for the relation's ID, but then remove it from results. Remove ID when unloading.
public beforeLoad ( $m, $q = null )

beforeModify() 공개 메소드

public beforeModify ( $m, $q )

beforeSave() 공개 메소드

public beforeSave ( $m )

fieldExpr() 공개 메소드

public fieldExpr ( $f )

hasMany() 공개 메소드

public hasMany ( $model, $their_field = null, $our_field = null, $as_field = null )

hasOne() 공개 메소드

public hasOne ( $model, $our_field = null, $display_field = null )

init() 공개 메소드

}}}
public init ( )

join() 공개 메소드

public join ( $foreign_table, $master_field = null, $join_kind = null, $_foreign_alias = null )

leftJoin() 공개 메소드

public leftJoin ( $foreign_table, $master_field = null, $join_kind = null, $_foreign_alias = null )

set() 공개 메소드

TODO: hasMany()
public set ( $foreign_table, $master_field = null, $join_kind = null, $relation = null )

프로퍼티 상세

$delete_behaviour 공개적으로 프로퍼티

public $delete_behaviour

$dsql 공개적으로 프로퍼티

public $dsql

$expr 공개적으로 프로퍼티

Join kind (left|right|inner|cross etc.)
public $expr

$f1 공개적으로 프로퍼티

public $f1

$f2 공개적으로 프로퍼티

Using expression when joining
public $f2

$fa 공개적으로 프로퍼티

Master field
public $fa

$id 공개적으로 프로퍼티

public $id

$m1 공개적으로 프로퍼티

short name / field alias ?
public $m1

$m2 공개적으로 프로퍼티

Foreign field
public $m2

$owner 공개적으로 프로퍼티

public SQL_Model $owner
리턴 SQL_Model

$relation 공개적으로 프로퍼티

$m1 == $relation->f1
public $relation

$t 공개적으로 프로퍼티

short_name = Foreign alias
public $t

$table_alias 공개적으로 프로퍼티

cascade, setnull, ignore
public $table_alias