Skip to content
Permalink
Browse files

Adding doc blocks

  • Loading branch information...
lorenzo committed Oct 10, 2016
1 parent ed38b1c commit dbbf6989b4232685bdbcefdc1d4ab36014b042b5
Showing with 77 additions and 0 deletions.
  1. +57 −0 src/ORM/Association/Loader/SelectLoader.php
  2. +20 −0 src/ORM/Association/Loader/SelectWithPivotLoader.php
@@ -27,24 +27,74 @@
class SelectLoader
{
/**
* The alias of the association loading the results
*
* @var string
*/
protected $alias;
/**
* The alias of the source association
*
* @var string
*/
protected $sourceAlias;
/**
* The alias of the target association
*
* @var string
*/
protected $targetAlias;
/**
* The foreignKey to the target association
*
* @var string|array
*/
protected $foreignKey;
/**
* The strategy to use for loading, either select or subquery
*
* @var string
*/
protected $strategy = 'select';
/**
* The binding key for the source association.
*
* @var string
*/
protected $bindingKey;
/**
* A callable that will return a query object used for loading the association results
*
* @var callable
*/
protected $finder;
/**
* The type of the association triggering the load
*
* @var string
*/
protected $associationType;
/**
* The sorting options for loading the association
*
* @var string
*/
protected $sort;
/**
* Copies the options array to properties in this class. The keys in the array correspond
* to properties in this class.
*
*/
public function __construct(array $options)
{
$this->alias = $options['alias'];
@@ -59,6 +109,13 @@ public function __construct(array $options)
}
/**
* Returns a callable that can be used for injecting association results into a given
* iterator. The options accepted by this method are the same as `Association::eagerLoader()`
*
* @param array $options Same options as `Association::eagerLoader()`
* @return callable
*/
public function buildLoadingQuery(array $options)
{
$options += $this->_defaultOptions();
@@ -23,12 +23,32 @@
class SelectWithPivotLoader extends SelectLoader
{
/**
* The name of the junction association
*
* @var string
*/
protected $junctionAssociationName;
/**
* The property name for the junction association, where its results should be nested at.
*
* @var string
*/
protected $junctionProperty;
/**
* The junction association instance
*
* @var \Cake\ORM\Association\HasMany
*/
protected $junctionAssoc;
/**
* Custom conditions for the junction association
*
* @var mixed
*/
protected $junctionConditions;
/**

0 comments on commit dbbf698

Please sign in to comment.
You can’t perform that action at this time.