PHP Класс SQL_Relation, atk4

Наследование: extends AbstractModel
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$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