Creating the Page Model Class

Once this table is created, you can create the model. First create the file for the page's Model class. Create a new file in application/models named Page.php. Open this file, follow the standard Zend model Model routine of creating a Model class that extends Zend_Db_Table_Abstract, and then set the table name property to pages (Listing 5-5).

Listing 5-5. Setting Up the Base Page Model Class in application/models/Page.php require_once 'Zend/Db/Table/Abstract.php';

require_once APPLICATION_PATH . '/models/ContentNode.php';

class Model_Page extends Zend_Db_Table_Abstract { /**

* The default table name */

Was this article helpful?

0 0

Post a comment