tag:blogger.com,1999:blog-7303829017133230496.post6325353659573460981..comments2023-06-03T01:55:26.318-04:00Comments on Adventures in Programming: Custom Behavior Example/TestDana Lutherhttp://www.blogger.com/profile/07289965994216523233noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7303829017133230496.post-55477706767359304622010-03-27T17:53:26.149-04:002010-03-27T17:53:26.149-04:00You should really only have one controller running...You should really only have one controller running per request though.<br /><br />In:<br />Yii::app()->Foo->checkLength($aString);<br /><br />it looks like Foo could actually an application component (which would extend CApplicationComponent)<br /><br />Another option would be to create an active record behavior (which extends CActiveRecordBehavior)<br /><br />The route I probably would Unknownhttps://www.blogger.com/profile/02383314521242445961noreply@blogger.comtag:blogger.com,1999:blog-7303829017133230496.post-87098659194699452512010-03-19T08:46:08.776-04:002010-03-19T08:46:08.776-04:00Now that I have a better feel for how this works, ...Now that I have a better feel for how this works, I think it would have been better to create a basically empty controller for my custom string manipulations, then in the application configuration add that controller to the app and attach the various behaviors like this one that will be needed. <br /><br />Then I can just use: Yii::app()->Foo->checkLength($aString);Dana Lutherhttps://www.blogger.com/profile/07289965994216523233noreply@blogger.com