diff --git a/src/ActiveRecord.php b/src/ActiveRecord.php index e9e0667..1c88c32 100644 --- a/src/ActiveRecord.php +++ b/src/ActiveRecord.php @@ -48,33 +48,6 @@ public function isScenarioDefault() return $this->scenario === static::SCENARIO_DEFAULT; } - /** - * Gets a record by its primary key. - * - * @param mixed $primaryKey the primaryKey value - * @param array $options options given in this parameter are passed to API - * - * @return null|static the record instance or null if it was not found - */ - public static function get($primaryKey = null, $options = []) - { - if ($primaryKey === null) { - return null; - } - $command = static::getDb()->createCommand(); - $result = $command->get(static::tableName(), $primaryKey, $options); - - if ($result) { - $model = static::instantiate($result); - static::populateRecord($model, $result); - $model->afterFind(); - - return $model; - } - - return null; - } - /** * This method defines the attribute that uniquely identifies a record. *