Open GoogleCodeExporter opened 9 years ago
I don't see the needs for cleaning up existing compiled rules. Could you please
elaborate the scenario in which you need this support?
Original comment by qiang.xue
on 29 Dec 2009 at 1:36
As you can see in my other ticket
(http://code.google.com/p/yii/issues/detail?id=767), I have problems generating
independent url's when the route (controller/action) is the same. To solve this
problem in my custom I18n component, I parse out specific rules in order to
make it
work. See attached file in createUrl() method were I create a new urlManager
instance
instead of just using Yii::app()->urlMananager. With a protected $_rules
property I
could just backup the original compiled rules, proccess the temporary rules +
create
the url and then set back the original compiled rules.
I really think this is an important feature, especially for any preloaded
component
that has to do with dynamic loading of url rules.
Original comment by keyboard...@gmail.com
on 29 Dec 2009 at 7:39
Attachments:
I just added CUrlManager::createUrlRule(). Now you can write your own url rule
class
to support more advanced/customized url creation/parsing.
We usually only change private variables to protected or public per user
request with
sufficient reasons. We may choose to refactor the code, instead, if that works
better.
Original comment by qiang.xue
on 29 Dec 2009 at 7:59
A good step to make things more extendable. Thanks!
Original comment by keyboard...@gmail.com
on 29 Dec 2009 at 8:39
Migrated to http://github.com/yiisoft/yii/issues/37
Original comment by qiang.xue
on 15 Feb 2012 at 6:36
Migrated to http://github.com/yiisoft/yii/issues/77
Original comment by qiang.xue
on 15 Feb 2012 at 6:45
Original issue reported on code.google.com by
keyboard...@gmail.com
on 29 Dec 2009 at 7:56