We have a small mvc we have built, we want to access models from different controllers.
i.e
class Controller {
function A() {
}
}
class Search extends Controller {
function B() {
$this->model->doSomething();
}
}
class Profile extends Controller {
function B() {
***** HERE ***** ?????????????????????????????????????????????
Search::doSomething();
}
}
class Model {
}
class search_model extends Model {
public function doSomething() {
// Do Something
echo "doing something";
}
}
class profile_model extends Model {
public function getProfile() {
// Get Profile
echo "getting profile";
}
}
I want to access when in the Profile Controller the Search Controller function doSomething() if you can see like the HERE section or something along them lines?