From 051002744627839db5b505d43662ef9111fd3101 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Wed, 18 Sep 2013 17:50:42 +0200 Subject: [PATCH] removed viaTable from redis AR --- framework/yii/redis/ActiveRelation.php | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/framework/yii/redis/ActiveRelation.php b/framework/yii/redis/ActiveRelation.php index aae21fc..a36f19d 100644 --- a/framework/yii/redis/ActiveRelation.php +++ b/framework/yii/redis/ActiveRelation.php @@ -45,47 +45,16 @@ class ActiveRelation extends \yii\redis\ActiveQuery /** * Specifies the relation associated with the pivot table. * @param string $relationName the relation name. This refers to a relation declared in [[primaryModel]]. - * @param callable $callable a PHP callback for customizing the relation associated with the pivot table. - * Its signature should be `function($query)`, where `$query` is the query to be customized. * @return ActiveRelation the relation object itself. */ - public function via($relationName, $callable = null) + public function via($relationName) { $relation = $this->primaryModel->getRelation($relationName); $this->via = array($relationName, $relation); - if ($callable !== null) { - call_user_func($callable, $relation); - } return $this; } /** - * Specifies the pivot table. - * @param string $tableName the name of the pivot table. - * @param array $link the link between the pivot table and the table associated with [[primaryModel]]. - * The keys of the array represent the columns in the pivot table, and the values represent the columns - * in the [[primaryModel]] table. - * @param callable $callable a PHP callback for customizing the relation associated with the pivot table. - * Its signature should be `function($query)`, where `$query` is the query to be customized. - * @return ActiveRelation - * / - public function viaTable($tableName, $link, $callable = null) - { - $relation = new ActiveRelation(array( - 'modelClass' => get_class($this->primaryModel), - 'from' => array($tableName), - 'link' => $link, - 'multiple' => true, - 'asArray' => true, - )); - $this->via = $relation; - if ($callable !== null) { - call_user_func($callable, $relation); - } - return $this; - }*/ - - /** * Finds the related records and populates them into the primary models. * This method is internally by [[ActiveQuery]]. Do not call it directly. * @param string $name the relation name