PHP Class Blast\Orm\Relations\ManyToMany

Inheritance: implements Blast\Orm\ConnectionAwareInterface, implements Blast\Orm\Entity\ProviderFactoryInterface, implements Blast\Orm\Relations\RelationInterface, use trait Blast\Orm\ConnectionAwareTrait, use trait Blast\Orm\Entity\EntityAwareTrait, use trait Blast\Orm\Entity\ProviderFactoryTrait, use trait RelationTrait
Afficher le fichier Open project: phpthinktank/blast-orm

Méthodes publiques

Méthode Description
__construct ( string | object $entity, string | object $foreignEntity, null | string $foreignKey = null, null | string $localKey = null, null | string | object $junction = null, null | string $junctionLocalKey = null, null | string $junctionForeignKey = null ) Many occurrences in local entity relate to many occurrences in foreign entity and vice versa.
execute ( ) : SplStack
getForeignEntity ( ) : object | string
getForeignKey ( ) : null | string
getJunction ( ) : null | object | string
getJunctionForeignKey ( ) : null | string
getJunctionLocalKey ( ) : null | string
getLocalKey ( ) : null | string
getQuery ( ) : Query Get relation query

Method Details

__construct() public méthode

The relations are linked by a junction table.
public __construct ( string | object $entity, string | object $foreignEntity, null | string $foreignKey = null, null | string $localKey = null, null | string | object $junction = null, null | string $junctionLocalKey = null, null | string $junctionForeignKey = null )
$entity string | object
$foreignEntity string | object
$foreignKey null | string Default field name is {foreign primary key name}
$localKey null | string Default field name is {local primary key name}
$junction null | string | object Default table name is {local entity table name}_{foreign entity table name}
$junctionLocalKey null | string Default field name is {local table name}_{$localKey}
$junctionForeignKey null | string Default field name is {foreign table name}_{$foreignKey}

execute() public méthode

public execute ( ) : SplStack
Résultat SplStack

getForeignEntity() public méthode

public getForeignEntity ( ) : object | string
Résultat object | string

getForeignKey() public méthode

public getForeignKey ( ) : null | string
Résultat null | string

getJunction() public méthode

public getJunction ( ) : null | object | string
Résultat null | object | string

getJunctionForeignKey() public méthode

public getJunctionForeignKey ( ) : null | string
Résultat null | string

getJunctionLocalKey() public méthode

public getJunctionLocalKey ( ) : null | string
Résultat null | string

getLocalKey() public méthode

public getLocalKey ( ) : null | string
Résultat null | string

getQuery() public méthode

Get relation query
public getQuery ( ) : Query
Résultat Blast\Orm\Query