Represents a single level in the associations tree to be eagerly loaded for a specific query. This contains all the information required to fetch the results from the database from an associations and all its children levels.
string
A dotted separated string representing the path of associations that should be followed to fetch this level.
arrayCake\ORM\EagerLoadable>
A list of other associations to load from this level.
bool
Whether this level can be fetched using a join.
array<string, mixed>
A list of options to pass to the association object for loading the records.
bool|null
Whether this level was meant for a "matching" fetch operation
Cake\ORM\Association|null
The Association class instance to use for loading the records.
string
The name of the association to load.
string|null
A dotted separated string representing the path of entity properties in which results for this level should be placed.
string|null
The property name where the association result should be nested in the result.
Handles cloning eager loadables.
Constructor. The $config parameter accepts the following array keys:
Adds a new association to be loaded from this level.
Gets a dot separated string representing the path of associations that should be followed to fetch this level.
Returns a representation of this object that can be passed to Cake\ORM\EagerLoader::contain()
Returns the Association class instance to use for loading the records.
Gets whether this level can be fetched using a join.
Gets whether this level was meant for a "matching" fetch operation.
Gets the list of options to pass to the association object for loading the records.
Gets the Association class instance to use for loading the records.
Gets a dot separated string representing the path of entity properties in which results for this level should be placed.
Sets whether this level can be fetched using a join.
Sets the list of options to pass to the association object for loading the records.
The property name where the result of this association should be nested at the end.
__clone(): void
Handles cloning eager loadables.
void
__construct(string $name, array<string, mixed> $config = [])
Constructor. The $config parameter accepts the following array keys:
The keys maps to the settable properties in this class.
string
$name The Association name.
array<string, mixed>
$config optional The list of properties to set.
addAssociation(string $name, Cake\ORM\EagerLoadable $association): void
Adds a new association to be loaded from this level.
string
$name The association name.
Cake\ORM\EagerLoadable
$association The association to load.
void
aliasPath(): string
Gets a dot separated string representing the path of associations that should be followed to fetch this level.
string
asContainArray(): array<string, array>
Returns a representation of this object that can be passed to Cake\ORM\EagerLoader::contain()
array<string, array>
associations(): arrayCake\ORM\EagerLoadable>
Returns the Association class instance to use for loading the records.
arrayCake\ORM\EagerLoadable>
canBeJoined(): bool
Gets whether this level can be fetched using a join.
bool
forMatching(): bool|null
Gets whether this level was meant for a "matching" fetch operation.
bool|null
getConfig(): array<string, mixed>
Gets the list of options to pass to the association object for loading the records.
array<string, mixed>
instance(): Cake\ORM\Association
Gets the Association class instance to use for loading the records.
Cake\ORM\Association
RuntimeException
propertyPath(): string|null
Gets a dot separated string representing the path of entity properties in which results for this level should be placed.
For example, in the following nested property:
$article->author->company->country
The property path of country
will be author.company
string|null
setCanBeJoined(bool $possible): $this
Sets whether this level can be fetched using a join.
bool
$possible The value to set.
$this
setConfig(array<string, mixed> $config): $this
Sets the list of options to pass to the association object for loading the records.
array<string, mixed>
$config The value to set.
$this
targetProperty(): string|null
The property name where the result of this association should be nested at the end.
For example, in the following nested property:
$article->author->company->country
The target property of country
will be just country
string|null
A dotted separated string representing the path of associations that should be followed to fetch this level.
string
A list of other associations to load from this level.
arrayCake\ORM\EagerLoadable>
Whether this level can be fetched using a join.
bool
A list of options to pass to the association object for loading the records.
array<string, mixed>
Whether this level was meant for a "matching" fetch operation
bool|null
The Association class instance to use for loading the records.
Cake\ORM\Association|null
The name of the association to load.
string
A dotted separated string representing the path of entity properties in which results for this level should be placed.
For example, in the following nested property:
$article->author->company->country
The property path of country
will be author.company
string|null
The property name where the association result should be nested in the result.
For example, in the following nested property:
$article->author->company->country
The target property of country
will be just country
string|null
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.ORM.EagerLoadable.html