Reputation: 33
I am new to cakePHP,
I have write a class in MODEL with name of myClass() and I have one function like func().
CODE:
class myClass(){
function func(){
echo "test";
}
}
But I don't know how to call the "myClass class" and run the function func() in the controller file in the cakePHP framework.
Upvotes: 0
Views: 610
Reputation: 17516
Of-course you can http://book.cakephp.org/view/943/Loading-Vendor-Files
App::import('Vendor', 'myClass');
$class = new myClass();
Upvotes: 2