Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
DAORelationsTrait Class Reference
+ Inheritance diagram for DAORelationsTrait:

Static Public Member Functions

static _getIncludedForStep ($included)
 
static _initRelationFields ($included, $metaDatas, &$invertedJoinColumns, &$oneToManyFields, &$manyToManyFields)
 
static getManyToOne ($instance, $member, $included=false, $useCache=NULL)
 Loads member associated with $instance by a ManyToOne relationship.
 
static getOneToMany ($instance, $member, $included=true, $useCache=NULL, $annot=null)
 Assign / load the child records in the $member member of $instance.
 
static getManyToMany ($instance, $member, $included=false, $array=null, $useCache=NULL)
 Assigns / loads the child records in the $member member of $instance.
 
static affectsManyToManys ($instance, $array=NULL, $useCache=NULL)
 

Static Protected Member Functions

static _getAll (Database $db, $className, ConditionParser $conditionParser, $included=true, $useCache=NULL)
 

Static Private Member Functions

static parseEncludeMember (&$ret, $includedMember)
 
static getInvertedJoinColumns ($included, &$invertedJoinColumns)
 
static getToManyFields ($included, &$toManyFields)
 
static getManyToManyFromArray ($instance, $array, $class, $parser)
 

Detailed Description

Definition at line 19 of file DAORelationsTrait.php.

Member Function Documentation

◆ _getAll()

static _getAll ( Database  $db,
  $className,
ConditionParser  $conditionParser,
  $included = true,
  $useCache = NULL 
)
staticabstractprotected

Reimplemented in SDAO.

◆ _getIncludedForStep()

static _getIncludedForStep (   $included)
static

Definition at line 23 of file DAORelationsTrait.php.

◆ _initRelationFields()

static _initRelationFields (   $included,
  $metaDatas,
$invertedJoinColumns,
$oneToManyFields,
$manyToManyFields 
)
static

Definition at line 84 of file DAORelationsTrait.php.

◆ affectsManyToManys()

static affectsManyToManys (   $instance,
  $array = NULL,
  $useCache = NULL 
)
static
Parameters
object$instance
array$array
boolean$useCache

Definition at line 236 of file DAORelationsTrait.php.

◆ getInvertedJoinColumns()

static getInvertedJoinColumns (   $included,
$invertedJoinColumns 
)
staticprivate

Definition at line 67 of file DAORelationsTrait.php.

◆ getManyToMany()

static getManyToMany (   $instance,
  $member,
  $included = false,
  $array = null,
  $useCache = NULL 
)
static

Assigns / loads the child records in the $member member of $instance.

If $array is null, the records are loaded from the database

Parameters
object | array$instanceThe instance object or an array with [classname,id]
string$memberMember on which a ManyToMany annotation must be present
boolean | array$includedif true, loads associate members with associations, if array, example : ['client.*','commands']
array$arrayoptional parameter containing the list of possible child records
boolean$useCache

Definition at line 206 of file DAORelationsTrait.php.

◆ getManyToManyFromArray()

static getManyToManyFromArray (   $instance,
  $array,
  $class,
  $parser 
)
staticprivate

Definition at line 107 of file DAORelationsTrait.php.

◆ getManyToOne()

static getManyToOne (   $instance,
  $member,
  $included = false,
  $useCache = NULL 
)
static

Loads member associated with $instance by a ManyToOne relationship.

Parameters
object | array$instanceThe instance object or an array with [classname,id]
string$memberThe member to load
boolean | array$includedif true, loads associate members with associations, if array, example : ["client.*","commands"]
boolean | null$useCache

Definition at line 141 of file DAORelationsTrait.php.

◆ getOneToMany()

static getOneToMany (   $instance,
  $member,
  $included = true,
  $useCache = NULL,
  $annot = null 
)
static

Assign / load the child records in the $member member of $instance.

Parameters
object | array$instanceThe instance object or an array with [classname,id]
string$memberMember on which a oneToMany annotation must be present
boolean | array$includedif true, loads associate members with associations, if array, example : ['client.*','commands']
boolean$useCache
array$annotused internally

Definition at line 176 of file DAORelationsTrait.php.

◆ getToManyFields()

static getToManyFields (   $included,
$toManyFields 
)
staticprivate

Definition at line 76 of file DAORelationsTrait.php.

◆ parseEncludeMember()

static parseEncludeMember ( $ret,
  $includedMember 
)
staticprivate

Definition at line 42 of file DAORelationsTrait.php.


The documentation for this class was generated from the following file: