On day 6 of the Tutorial, in the 'Refactoring' section we add a method getActiveJobs() to the JobeetJobTable class.
Then we use the method in executeIndex() action, like this:
- Code: Select all
public function executeIndex(sfWebRequest $request)
$this->jobeet_jobs = Doctrine_Core::getTable('JobeetJob')->getActiveJobs();
I works, but I wonder how?
As Doctrine_Core::getTable() returns an object type Doctrine_Table which shouldn't be aware of a method we added to JobeetJobTable class, yet it apparently does. As far as I know, Doctrine_Core doesn't inherit from Doctrine_Table, so it can't be plain inheritance. Could someone please explain how does it work?
Thanks in advance for any valuable explanation.