Yii Framework Forum: CExtController how to? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CExtController how to? why i can't find info on this? Rate Topic: -----

#1 User is offline   tydeas_dr 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 158
  • Joined: 16-April 10
  • Location:Greece

Posted 18 May 2010 - 04:29 AM

Hello, I want to create an Extension Controller to have some defaults action all.
I assume i create a dir under the extensions/mycontroller/
In file Mycontroller.php i do:
class MyController extend CExtController {
    public function actionDefault() {
        ......
        $foo=new Foo();
        ......
    }
}

Now the question i have are. Should the the functions be protected or public ?
If i want to have my extension controller independent from the model how can i do this.I mean in the actionDefault instead of Foo() and general when i need something like Foo::model() what can i use instead of it?
Last but not least.
How can then use the CExtController to be extending some controllers under Controller? should i use somethign like require_once?
Follow me on twitter @dmtrsslvdr
Check my *new* blog @ tumblr
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users