summaryrefslogtreecommitdiff
path: root/demos/activeblog/protected/App_Pages/Home.php
diff options
context:
space:
mode:
authorjrags <>2007-02-21 16:31:50 +0000
committerjrags <>2007-02-21 16:31:50 +0000
commit0da331cb45cf202bf7fbd519c8d65f5956c85b2b (patch)
tree7c73d6f7e0ae58a053720a6c0ff35ace2acb6c40 /demos/activeblog/protected/App_Pages/Home.php
parenta2555e2441f51147e9e773f38624021067744d21 (diff)
Converted BlogDataModule Record classes to use active record, also changed the data module to load the database into the active record handler
Diffstat (limited to 'demos/activeblog/protected/App_Pages/Home.php')
-rw-r--r--demos/activeblog/protected/App_Pages/Home.php25
1 files changed, 23 insertions, 2 deletions
diff --git a/demos/activeblog/protected/App_Pages/Home.php b/demos/activeblog/protected/App_Pages/Home.php
index e4bda2c3..0012e073 100644
--- a/demos/activeblog/protected/App_Pages/Home.php
+++ b/demos/activeblog/protected/App_Pages/Home.php
@@ -1,6 +1,27 @@
<?php
-class Home extends TPage
+class Home extends BlogPage
{
-
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+
+ // sqlite_open(dirname(__FILE__).'/../App_Data/blog.db');
+
+ // $finder = UserRecord::finder();
+ // $user = $finder->findByPk(1);
+ // echo TVarDumper::dump($user,10,true);
+ //
+ // $finder = PostRecord::finder();
+ // $post = $finder->findByPk(1);
+ // echo TVarDumper::dump($post,10,true);
+ //
+ // $finder = CategoryRecord::finder();
+ // $categories = $finder->findAll();
+ // echo TVarDumper::dump($categories,10,true);
+ //
+ // $finder = Post2CategoryRecord::finder();
+ // $post2category = $finder->findByPk(1,1);
+ // echo TVarDumper::dump($post2category,10,true);
+ }
}
?> \ No newline at end of file