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 [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.