PHP Class SQL_Relation, atk4

Inheritance: extends AbstractModel
Afficher le fichier Open project: atk4/atk4

Méthodes publiques

Свойство Type Description
$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

Méthodes publiques

Méthode Description
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()

Method Details

addField() public méthode

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

afterDelete() public méthode

public afterDelete ( $m )

afterInsert() public méthode

public afterInsert ( $m, $id )

afterLoad() public méthode

public afterLoad ( $m )

afterUnload() public méthode

public afterUnload ( $m )

beforeDelete() public méthode

public beforeDelete ( $m, $id )

beforeInsert() public méthode

public beforeInsert ( $m, $q )

beforeLoad() public méthode

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

beforeModify() public méthode

public beforeModify ( $m, $q )

beforeSave() public méthode

public beforeSave ( $m )

fieldExpr() public méthode

public fieldExpr ( $f )

hasMany() public méthode

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

hasOne() public méthode

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

init() public méthode

}}}
public init ( )

join() public méthode

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

leftJoin() public méthode

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

set() public méthode

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

Property Details

$delete_behaviour public_oe property

public $delete_behaviour

$dsql public_oe property

public $dsql

$expr public_oe property

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

$f1 public_oe property

public $f1

$f2 public_oe property

Using expression when joining
public $f2

$fa public_oe property

Master field
public $fa

$id public_oe property

public $id

$m1 public_oe property

short name / field alias ?
public $m1

$m2 public_oe property

Foreign field
public $m2

$owner public_oe property

public SQL_Model $owner
Résultat SQL_Model

$relation public_oe property

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

$t public_oe property

short_name = Foreign alias
public $t

$table_alias public_oe property

cascade, setnull, ignore
public $table_alias