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.
stringA 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.
boolWhether 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|nullWhether this level was meant for a "matching" fetch operation
Cake\ORM\Association|nullThe Association class instance to use for loading the records.
stringThe name of the association to load.
string|nullA dotted separated string representing the path of entity properties in which results for this level should be placed.
string|nullThe 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.
voidaliasPath(): string
Gets a dot separated string representing the path of associations that should be followed to fetch this level.
stringasContainArray(): 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.
boolforMatching(): bool|null
Gets whether this level was meant for a "matching" fetch operation.
bool|nullgetConfig(): 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\AssociationRuntimeExceptionpropertyPath(): 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|nullsetCanBeJoined(bool $possible): $this
Sets whether this level can be fetched using a join.
bool $possible The value to set.
$thissetConfig(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.
$thistargetProperty(): 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|nullA dotted separated string representing the path of associations that should be followed to fetch this level.
stringA list of other associations to load from this level.
arrayCake\ORM\EagerLoadable>Whether this level can be fetched using a join.
boolA 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|nullThe Association class instance to use for loading the records.
Cake\ORM\Association|nullThe name of the association to load.
stringA 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|nullThe 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