Can this work for Cake 1.3?

On Thursday, September 6, 2012 12:23:39 PM UTC+7, andrewperk wrote:
>
> I do this:
>
> <?php
> // Loads in the TestController from the Test plugin Controller package
> App::uses('TestController', 'Test.Controller');
>
> class AppController extends Controller {
>
>     public function beforeFilter() {
>         // Instantiate the TestController
>         // Call your method
>         $Test = ClassRegistry::init('TestController');
>         $Test->ping();
>     }
> }
>
> On Wednesday, September 5, 2012 4:06:39 PM UTC-7, Salines wrote:
>>
>> eg I have a plugin called Test, and the class named TestController, where 
>> I have a ping function  , public function ping() {...}
>>
>> how can I call the ping function from app controller beforeFilter 
>> function?
>>
>> public function beforeFilter(){
>>  // call Plugin/Test/TestController/ping() ???
>> }
>>
>> Thanx
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.


Reply via email to