I have 3 modules in my application: Patients, Songs, PatientSongs
I want Songs url to display all songs. I want Patients url to display all patients.
For PatientSongs I would like to show the result of a join in the songs table.
My Module in PatientSongs is configured ad below:
return array(
'factories' => array(
'Songs\Model\SongsTable' => function($sm) {
$tableGateway = $sm->get('SongsTableGateway');
$table = new SongsTable($tableGateway);
return $table;
},
'SongsTableGateway' => function ($sm) {
$dbAdapter = $sm->get('Zend\Db\Adapter\Adapter');
$resultSetPrototype = new \Zend\Db\ResultSet\ResultSet();
$resultSetPrototype->setArrayObjectPrototype(new \Songs\Model\Entity\Song());
return new TableGateway('songs', $dbAdapter, null, $resultSetPrototype);
},
),
);
Im getting an error that reads Fatal error: Class 'Songs\Model\Entity\Song' not found in C:\xampp\htdocs\zf2-tutorial\module\PatientSongs\Module.php on line 41
.
My module structure for Songs is Songs\src\Songs\Model\SongsTable
and Songs\src\Songs\Model\Entity\Song
I cant figure out why it cant find this path.
Can anyone help?