$_name
$_name : string
The name of the association to load.
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.
$_associations : array<mixed,\Cake\ORM\EagerLoadable>
A list of other associations to load from this level.
$_instance : \Cake\ORM\Association
The Association class instance to use for loading the records.
$_propertyPath : 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
__construct(string $name, array $config = array())
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 | $config | 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. |
instance() : \Cake\ORM\Association|null
Gets the Association class instance to use for loading the records.
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
canBeJoined(boolean|null $possible = null) : boolean
Gets whether or not this level can be fetched using a join.
If called with arguments it sets the value. As of 3.4.0 the setter part is deprecated, use setCanBeJoined() instead.
boolean|null | $possible | The value to set. |
forMatching() : boolean|null
Gets whether or not this level was meant for a "matching" fetch operation.
None found |
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
None found |
asContainArray() : array
Returns a representation of this object that can be passed to Cake\ORM\EagerLoader::contain()
None found |