Skip to content
Permalink
Browse files

Small changes to selectloader

  • Loading branch information...
lorenzo committed Oct 11, 2016
1 parent abd13e5 commit 0a3f52eecdedcd8bc42f039b59a4cda00d61539d
@@ -761,7 +761,7 @@ public function requiresKeys(array $options = [])
{
$strategy = isset($options['strategy']) ? $options['strategy'] : $this->strategy();
return $strategy === $this::STRATEGY_SELECT;
return $strategy === static::STRATEGY_SELECT;
}
/**
@@ -201,6 +201,6 @@ public function eagerLoader(array $options)
'finder' => [$this, 'find']
]);
return $loader->buildLoadingQuery($options);
return $loader->buildEagerLoader($options);
}
}
@@ -527,7 +527,7 @@ public function eagerLoader(array $options)
}
]);
return $loader->buildLoadingQuery($options);
return $loader->buildEagerLoader($options);
}
/**
@@ -602,6 +602,6 @@ public function eagerLoader(array $options)
'finder' => [$this, 'find']
]);
return $loader->buildLoadingQuery($options);
return $loader->buildEagerLoader($options);
}
}
@@ -146,6 +146,6 @@ public function eagerLoader(array $options)
'finder' => [$this, 'find']
]);
return $loader->buildLoadingQuery($options);
return $loader->buildEagerLoader($options);
}
}
@@ -23,6 +23,8 @@
/**
* Implements the logic for loading an association using a SELECT query
*
* @internal
*/
class SelectLoader
{
@@ -60,7 +62,7 @@ class SelectLoader
*
* @var string
*/
protected $strategy = 'select';
protected $strategy;
/**
* The binding key for the source association.
@@ -117,7 +119,7 @@ public function __construct(array $options)
* @param array $options Same options as `Association::eagerLoader()`
* @return callable
*/
public function buildLoadingQuery(array $options)
public function buildEagerLoader(array $options)
{
$options += $this->_defaultOptions();
$fetchQuery = $this->_buildQuery($options);
@@ -19,6 +19,8 @@
/**
* Implements the logic for loading an association using a SELECT query and a pivot table
*
* @internal
*/
class SelectWithPivotLoader extends SelectLoader
{

0 comments on commit 0a3f52e

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