mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 14:28:27 +08:00
Added extra callable typehints
This commit is contained in:
@ -699,7 +699,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface
|
|||||||
* @return static
|
* @return static
|
||||||
* @see via()
|
* @see via()
|
||||||
*/
|
*/
|
||||||
public function viaTable($tableName, $link, $callable = null)
|
public function viaTable($tableName, $link, callable $callable = null)
|
||||||
{
|
{
|
||||||
$relation = new ActiveQuery(get_class($this->primaryModel), [
|
$relation = new ActiveQuery(get_class($this->primaryModel), [
|
||||||
'from' => [$tableName],
|
'from' => [$tableName],
|
||||||
|
@ -99,7 +99,7 @@ trait ActiveRelationTrait
|
|||||||
* Its signature should be `function($query)`, where `$query` is the query to be customized.
|
* Its signature should be `function($query)`, where `$query` is the query to be customized.
|
||||||
* @return static the relation object itself.
|
* @return static the relation object itself.
|
||||||
*/
|
*/
|
||||||
public function via($relationName, $callable = null)
|
public function via($relationName, callable $callable = null)
|
||||||
{
|
{
|
||||||
$relation = $this->primaryModel->getRelation($relationName);
|
$relation = $this->primaryModel->getRelation($relationName);
|
||||||
$this->via = [$relationName, $relation];
|
$this->via = [$relationName, $relation];
|
||||||
|
Reference in New Issue
Block a user