Skip to content

Commit

Permalink
removed ActiveRecord::prepare()
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Jan 26, 2017
1 parent 729f46c commit dfb1362
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
3 changes: 0 additions & 3 deletions src/ActiveQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ public function createCommand($db = null)
*/
public function prepare($builder = null)
{
$class = $this->modelClass;
$class::prepare($this, $builder);

// NOTE: because the same ActiveQuery may be used to build different SQL statements
// (e.g. by ActiveDataProvider, one for count query, the other for row data query,
// it is important to make sure the same ActiveQuery can be used to build SQL statements
Expand Down
8 changes: 0 additions & 8 deletions src/ActiveRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@ public static function find()
return new $class(get_called_class());
}

/**
* This function is called from `Query::prepare`.
* You can redefine it to get desired behavior.
*/
public static function prepare(Query $query, QueryBuilderInterface $builder)
{
}

public function isScenarioDefault()
{
return $this->scenario === static::SCENARIO_DEFAULT;
Expand Down

0 comments on commit dfb1362

Please sign in to comment.