Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony difference between <ModelName>.class.php and <ModelName>Table.class.php

Cuold someone explain me the difference between the Doctrine auto generated files <ModelName>.class.php and <ModelName>Table.class.php? For example in the Jobeet tutorial there's JobeetJob.class.php and JobeetJobTable.class.php.

I don't understand the role of each file and where I have to put methods for the model class.

like image 377
ArR4y Avatar asked Nov 03 '09 15:11

ArR4y


1 Answers

XXX.class file holds Doctrine_Record descendant, which is intended to operate on a single record. Save, create, edit etc. XXXTable.class.php holds Doctrine_Table descendant, which is intended to operate on a whole table. Searching for records for example.

like image 183
Vladislav Rastrusny Avatar answered Oct 12 '22 12:10

Vladislav Rastrusny