Changeset 2951 for documentation/trunk/topics/examples.xml
- Timestamp:
- 09/27/08 17:43:42 (3 months ago)
- Files:
-
- 1 modified
-
documentation/trunk/topics/examples.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
documentation/trunk/topics/examples.xml
r2748 r2951 41 41 </configuration> 42 42 </configurations> 43 </codeblock> 44 <codeblock id="stage2-base-model"> 45 /** 46 * The base model from which all project models inherit. 47 */ 48 49 class BlogBaseModel extends AgaviModel 50 { 51 /** 52 * Return the PDO resource needed to access the blog database 53 * @return PDO 54 */ 55 protected function getPdo() 56 { 57 // The connection parameters are configured in app/config/databases.xml 58 return $this->context->getDatabaseManager()->getDatabase()->getConnection('blog'); 59 } 60 } 61 62 ?> 43 63 </codeblock> 44 64 <codeblock id="stage2-posts-model">

