From 08e65958dd5cbcc0980e1edfe1642fe7cb5a505c Mon Sep 17 00:00:00 2001 From: surgat Date: Tue, 25 Nov 2014 15:53:06 +0300 Subject: [PATCH] Update runtime-routing.md --- docs/guide/runtime-routing.md | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/docs/guide/runtime-routing.md b/docs/guide/runtime-routing.md index 1ae82bffe6..0ca3898757 100644 --- a/docs/guide/runtime-routing.md +++ b/docs/guide/runtime-routing.md @@ -578,19 +578,11 @@ We can create the following URL rule class to solve this problem. ```php namespace app\components; -use yii\web\UrlRule; +use yii\web\UrlRuleInterface; +use yii\base\Object; -class CarUrlRule extends UrlRule +class CarUrlRule extends Object implements UrlRuleInterface { - public $db = 'db'; - - public function init() - { - parent::init(); - if ($this->name === null) { - $this->name = __CLASS__; - } - } public function createUrl($manager, $route, $params) {