Zend framework helper form

advertisements

I'm trying to work out how below works...

Where does Jobs_Form_Report_Productivity() come from?

public function productivityAction(){
        $this->view->headTitle('Number of Unique Jobs by Portfolio');
        $this->view->form = new Jobs_Form_Report_Productivity();

        if($this->view->form->isValid($_POST))
        {
            $report = new Model_Users();

            $this->view->results = $report->reportProductivity(
                $this->view->form->getStartDate('yyy-MM-dd'),
                $this->view->form->getEndDate('yyy-MM-dd')
            );
        }

    }

Is this some form of Model class?


ZF1 uses PEAR namespacing (note the underscores), each underscore becomes a directory separator and the last part of the classname is usually the name of the file typically something like 'Productivity.php', so Jobs_From_Report_Productivity should be located in Jobs/Form/Report in a file called 'Productivity.php'. Since the classname you are looking for does not start with 'Application_', my suggestion is that it is a module namespace called 'jobs', so you are probably looking for 'application/modules/jobs/forms/report/Productivity.php, otherwise it could be in the library directory as library/jobs/forms/report/Productivity.php. Of course, its completey possible to do some weird and wonderful things with the locations that ZF1 uses to locate classes.