PHP Class Spot\Relation\RelationAbstract

Afficher le fichier Open project: vlucas/spot2 Class Usage Examples

Protected Properties

Свойство Type Description
$entityName
$foreignKey
$identityValue
$localKey
$mapper
$query
$queryQueue
$result

Méthodes publiques

Méthode Description
__call ( $func, $args ) Passthrough for missing methods on expected object result
eagerLoadOnCollection ( $relationName, Collection $collection ) : Spot\Collection Map relation results to original collection of entities
entityKey ( ) : string Get entity key field - defaults to the primary key
entityName ( ) : string Get entity name object
execute ( ) Execute query and return results
foreignKey ( ) : string Get foreign key field
identityValue ( $identityValue = null ) : mixed Get identity value
identityValuesFromCollection ( Collection $collection ) Set identity values from given collection
localKey ( ) : string Get local key field
mapper ( ) : Mapper Get Mapper object
query ( ) Get query object instance
save ( Spot\EntityInterface $entity, string $relationName, array $options = [] ) : boolean Save related entities

Méthodes protégées

Méthode Description
buildQuery ( ) : Query Build query object

Method Details

__call() public méthode

Passthrough for missing methods on expected object result
public __call ( $func, $args )

buildQuery() abstract protected méthode

Build query object
abstract protected buildQuery ( ) : Query
Résultat Spot\Query

eagerLoadOnCollection() public méthode

Map relation results to original collection of entities
public eagerLoadOnCollection ( $relationName, Collection $collection ) : Spot\Collection
$collection Spot\Entity\Collection
Résultat Spot\Collection

entityKey() public méthode

Get entity key field - defaults to the primary key
public entityKey ( ) : string
Résultat string

entityName() public méthode

Get entity name object
public entityName ( ) : string
Résultat string

execute() public méthode

Execute query and return results
public execute ( )

foreignKey() public méthode

Get foreign key field
public foreignKey ( ) : string
Résultat string

identityValue() public méthode

Get identity value
public identityValue ( $identityValue = null ) : mixed
Résultat mixed Array, string, or id

identityValuesFromCollection() abstract public méthode

Set identity values from given collection
abstract public identityValuesFromCollection ( Collection $collection )
$collection Spot\Entity\Collection

localKey() public méthode

Get local key field
public localKey ( ) : string
Résultat string

mapper() public méthode

Get Mapper object
public mapper ( ) : Mapper
Résultat Spot\Mapper

query() public méthode

Get query object instance
public query ( )

save() abstract public méthode

Save related entities
abstract public save ( Spot\EntityInterface $entity, string $relationName, array $options = [] ) : boolean
$entity Spot\EntityInterface Entity to save relation from
$relationName string Name of the relation to save
$options array Options to pass to the mappers
Résultat boolean

Property Details

$entityName protected_oe property

protected $entityName

$foreignKey protected_oe property

protected $foreignKey

$identityValue protected_oe property

protected $identityValue

$localKey protected_oe property

protected $localKey

$mapper protected_oe property

protected $mapper

$query protected_oe property

protected $query

$queryQueue protected_oe property

protected $queryQueue

$result protected_oe property

protected $result