[Solar-svn] Revision 2723

pmjones at solarphp.com pmjones at solarphp.com
Tue Aug 21 09:50:22 CDT 2007


Branch: Solar_Example_Model*: added example models for testing purposes



Added: branches/orm/Solar/Example/Model/Areas/Collection.php
===================================================================
--- branches/orm/Solar/Example/Model/Areas/Collection.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Areas/Collection.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,3 @@
+<?php
+class Solar_Example_Model_Areas_Collection extends Solar_Sql_Model_Collection {
+}
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Areas/Record.php
===================================================================
--- branches/orm/Solar/Example/Model/Areas/Record.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Areas/Record.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,3 @@
+<?php
+class Solar_Example_Model_Areas_Record extends Solar_Sql_Model_Record {
+}
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Areas/Setup/table_cols.php
===================================================================
--- branches/orm/Solar/Example/Model/Areas/Setup/table_cols.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Areas/Setup/table_cols.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,58 @@
+<?php
+return array (
+  'id' => 
+  array (
+    'name' => 'id',
+    'type' => 'int',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => true,
+    'primary' => true,
+    'autoinc' => true,
+  ),
+  'created' => 
+  array (
+    'name' => 'created',
+    'type' => 'timestamp',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => false,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+  'updated' => 
+  array (
+    'name' => 'updated',
+    'type' => 'timestamp',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => false,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+  'user_id' => 
+  array (
+    'name' => 'user_id',
+    'type' => 'int',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => '',
+    'require' => true,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+  'name' => 
+  array (
+    'name' => 'name',
+    'type' => 'varchar',
+    'size' => 127,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => false,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+);
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Areas/Setup/table_name.php
===================================================================
--- branches/orm/Solar/Example/Model/Areas/Setup/table_name.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Areas/Setup/table_name.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,2 @@
+<?php
+return 'test_solar_areas';
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Areas.php
===================================================================
--- branches/orm/Solar/Example/Model/Areas.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Areas.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,25 @@
+<?php
+class Solar_Example_Model_Areas extends Solar_Sql_Model {
+    
+    protected function _setup()
+    {
+        $dir = str_replace('_', DIRECTORY_SEPARATOR, __CLASS__)
+             . DIRECTORY_SEPARATOR
+             . 'Setup'
+             . DIRECTORY_SEPARATOR;
+        
+        $this->_table_name = Solar::run($dir . 'table_name.php');
+        $this->_table_cols = Solar::run($dir . 'table_cols.php');
+        
+        $this->_hasMany('nodes', array(
+            'foreign_model' => 'nodes',
+            'foreign_key'   => 'area_id',
+        ));
+        
+        $this->_belongsTo('user', array(
+            'foreign_model' => 'users',
+            'foreign_key'   => 'user_id',
+        ));
+        
+    }
+}
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Metas/Collection.php
===================================================================
--- branches/orm/Solar/Example/Model/Metas/Collection.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Metas/Collection.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,3 @@
+<?php
+class Solar_Example_Model_Metas_Collection extends Solar_Sql_Model_Collection {
+}
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Metas/Record.php
===================================================================
--- branches/orm/Solar/Example/Model/Metas/Record.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Metas/Record.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,3 @@
+<?php
+class Solar_Example_Model_Metas_Record extends Solar_Sql_Model_Record {
+}
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Metas/Setup/table_cols.php
===================================================================
--- branches/orm/Solar/Example/Model/Metas/Setup/table_cols.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Metas/Setup/table_cols.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,69 @@
+<?php
+return array (
+  'id' => 
+  array (
+    'name' => 'id',
+    'type' => 'int',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => true,
+    'primary' => true,
+    'autoinc' => true,
+  ),
+  'node_id' => 
+  array (
+    'name' => 'node_id',
+    'type' => 'int',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => '',
+    'require' => true,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+  'last_comment_id' => 
+  array (
+    'name' => 'last_comment_id',
+    'type' => 'int',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => '',
+    'require' => false,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+  'last_comment_by' => 
+  array (
+    'name' => 'last_comment_by',
+    'type' => 'varchar',
+    'size' => 255,
+    'scope' => NULL,
+    'default' => '',
+    'require' => false,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+  'last_comment_at' => 
+  array (
+    'name' => 'last_comment_at',
+    'type' => 'timestamp',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => '',
+    'require' => false,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+  'comment_count' => 
+  array (
+    'name' => 'comment_count',
+    'type' => 'int',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => '',
+    'require' => false,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+);
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Metas/Setup/table_name.php
===================================================================
--- branches/orm/Solar/Example/Model/Metas/Setup/table_name.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Metas/Setup/table_name.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,2 @@
+<?php
+return 'test_solar_metas';
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Metas.php
===================================================================
--- branches/orm/Solar/Example/Model/Metas.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Metas.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,19 @@
+<?php
+class Solar_Example_Model_Metas extends Solar_Sql_Model {
+    
+    protected function _setup()
+    {
+        $dir = str_replace('_', DIRECTORY_SEPARATOR, __CLASS__)
+             . DIRECTORY_SEPARATOR
+             . 'Setup'
+             . DIRECTORY_SEPARATOR;
+        
+        $this->_table_name = Solar::run($dir . 'table_name.php');
+        $this->_table_cols = Solar::run($dir . 'table_cols.php');
+        
+        $this->_belongsTo('node', array(
+            'foreign_model' => 'nodes',
+            'foreign_key'   => 'node_id',
+        ));
+    }
+}
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Nodes/Collection.php
===================================================================
--- branches/orm/Solar/Example/Model/Nodes/Collection.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Nodes/Collection.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,3 @@
+<?php
+class Solar_Example_Model_Nodes_Collection extends Solar_Sql_Model_Collection {
+}
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Nodes/Record.php
===================================================================
--- branches/orm/Solar/Example/Model/Nodes/Record.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Nodes/Record.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,3 @@
+<?php
+class Solar_Example_Model_Nodes_Record extends Solar_Sql_Model_Record {
+}
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Nodes/Setup/table_cols.php
===================================================================
--- branches/orm/Solar/Example/Model/Nodes/Setup/table_cols.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Nodes/Setup/table_cols.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,102 @@
+<?php
+return array (
+  'id' => 
+  array (
+    'name' => 'id',
+    'type' => 'int',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => true,
+    'primary' => true,
+    'autoinc' => true,
+  ),
+  'created' => 
+  array (
+    'name' => 'created',
+    'type' => 'timestamp',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => false,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+  'updated' => 
+  array (
+    'name' => 'updated',
+    'type' => 'timestamp',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => false,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+  'area_id' => 
+  array (
+    'name' => 'area_id',
+    'type' => 'int',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => '',
+    'require' => true,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+  'user_id' => 
+  array (
+    'name' => 'user_id',
+    'type' => 'int',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => false,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+  'node_id' => 
+  array (
+    'name' => 'node_id',
+    'type' => 'int',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => false,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+  'inherit' => 
+  array (
+    'name' => 'inherit',
+    'type' => 'varchar',
+    'size' => 32,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => false,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+  'subj' => 
+  array (
+    'name' => 'subj',
+    'type' => 'varchar',
+    'size' => 255,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => false,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+  'body' => 
+  array (
+    'name' => 'body',
+    'type' => 'clob',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => false,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+);
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Nodes/Setup/table_name.php
===================================================================
--- branches/orm/Solar/Example/Model/Nodes/Setup/table_name.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Nodes/Setup/table_name.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,2 @@
+<?php
+return 'test_solar_nodes';
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Nodes.php
===================================================================
--- branches/orm/Solar/Example/Model/Nodes.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Nodes.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,40 @@
+<?php
+class Solar_Example_Model_Nodes extends Solar_Sql_Model {
+    
+    protected function _setup()
+    {
+        $dir = str_replace('_', DIRECTORY_SEPARATOR, __CLASS__)
+             . DIRECTORY_SEPARATOR
+             . 'Setup'
+             . DIRECTORY_SEPARATOR;
+        
+        $this->_table_name = Solar::run($dir . 'table_name.php');
+        $this->_table_cols = Solar::run($dir . 'table_cols.php');
+        
+        $this->_belongsTo('area', array(
+            'foreign_model' => 'areas',
+            'foreign_key'   => 'area_id',
+        ));
+        
+        $this->_belongsTo('user', array(
+            'foreign_model' => 'users',
+            'foreign_key'   => 'user_id',
+        ));
+        
+        $this->_hasOne('meta', array(
+            'foreign_model' => 'metas',
+            'foreign_key'   => 'node_id',
+        ));
+        
+        $this->_hasMany('taggings', array(
+            'foreign_model' => 'taggings',
+            'foreign_key'   => 'node_id',
+        ));
+        
+        $this->_hasMany('tags', array(
+            'foreign_model' => 'tags',
+            'through'       => 'taggings',
+            'through_key'   => 'tag_id',
+        ));
+    }
+}
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Taggings/Collection.php
===================================================================
--- branches/orm/Solar/Example/Model/Taggings/Collection.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Taggings/Collection.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,3 @@
+<?php
+class Solar_Example_Model_Taggings_Collection extends Solar_Sql_Model_Collection {
+}
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Taggings/Record.php
===================================================================
--- branches/orm/Solar/Example/Model/Taggings/Record.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Taggings/Record.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,3 @@
+<?php
+class Solar_Example_Model_Taggings_Record extends Solar_Sql_Model_Record {
+}
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Taggings/Setup/table_cols.php
===================================================================
--- branches/orm/Solar/Example/Model/Taggings/Setup/table_cols.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Taggings/Setup/table_cols.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,36 @@
+<?php
+return array (
+  'id' => 
+  array (
+    'name' => 'id',
+    'type' => 'int',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => true,
+    'primary' => true,
+    'autoinc' => true,
+  ),
+  'node_id' => 
+  array (
+    'name' => 'node_id',
+    'type' => 'int',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => false,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+  'tag_id' => 
+  array (
+    'name' => 'tag_id',
+    'type' => 'int',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => false,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+);
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Taggings/Setup/table_name.php
===================================================================
--- branches/orm/Solar/Example/Model/Taggings/Setup/table_name.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Taggings/Setup/table_name.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,2 @@
+<?php
+return 'test_solar_taggings';
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Taggings.php
===================================================================
--- branches/orm/Solar/Example/Model/Taggings.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Taggings.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,22 @@
+<?php
+class Solar_Example_Model_Taggings extends Solar_Sql_Model {
+    
+    protected function _setup()
+    {
+        $dir = str_replace('_', DIRECTORY_SEPARATOR, __CLASS__)
+             . DIRECTORY_SEPARATOR
+             . 'Setup'
+             . DIRECTORY_SEPARATOR;
+        
+        $this->_table_name = Solar::run($dir . 'table_name.php');
+        $this->_table_cols = Solar::run($dir . 'table_cols.php');
+        
+        $this->_belongsTo('node', array(
+            'foreign_model' => 'nodes',
+        ));
+        
+        $this->_belongsTo('tag', array(
+            'foreign_model' => 'tags',
+        ));
+    }
+}
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Tags/Collection.php
===================================================================
--- branches/orm/Solar/Example/Model/Tags/Collection.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Tags/Collection.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,3 @@
+<?php
+class Solar_Example_Model_Tags_Collection extends Solar_Sql_Model_Collection {
+}
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Tags/Record.php
===================================================================
--- branches/orm/Solar/Example/Model/Tags/Record.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Tags/Record.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,3 @@
+<?php
+class Solar_Example_Model_Tags_Record extends Solar_Sql_Model_Record {
+}
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Tags/Setup/table_cols.php
===================================================================
--- branches/orm/Solar/Example/Model/Tags/Setup/table_cols.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Tags/Setup/table_cols.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,36 @@
+<?php
+return array (
+  'id' => 
+  array (
+    'name' => 'id',
+    'type' => 'int',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => true,
+    'primary' => true,
+    'autoinc' => true,
+  ),
+  'name' => 
+  array (
+    'name' => 'name',
+    'type' => 'varchar',
+    'size' => 255,
+    'scope' => NULL,
+    'default' => '',
+    'require' => true,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+  'summ' => 
+  array (
+    'name' => 'summ',
+    'type' => 'varchar',
+    'size' => 255,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => false,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+);
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Tags/Setup/table_name.php
===================================================================
--- branches/orm/Solar/Example/Model/Tags/Setup/table_name.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Tags/Setup/table_name.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,2 @@
+<?php
+return 'test_solar_tags';
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Tags.php
===================================================================
--- branches/orm/Solar/Example/Model/Tags.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Tags.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,19 @@
+<?php
+class Solar_Example_Model_Tags extends Solar_Sql_Model {
+    
+    protected function _setup()
+    {
+        $dir = str_replace('_', DIRECTORY_SEPARATOR, __CLASS__)
+             . DIRECTORY_SEPARATOR
+             . 'Setup'
+             . DIRECTORY_SEPARATOR;
+        
+        $this->_table_name = Solar::run($dir . 'table_name.php');
+        $this->_table_cols = Solar::run($dir . 'table_cols.php');
+        
+        $this->_hasMany('taggings');
+        $this->_hasMany('nodes', array(
+            'through' => 'taggings',
+        ));
+    }
+}
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Users/Collection.php
===================================================================
--- branches/orm/Solar/Example/Model/Users/Collection.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Users/Collection.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,3 @@
+<?php
+class Solar_Example_Model_Users_Collection extends Solar_Sql_Model_Collection {
+}
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Users/Record.php
===================================================================
--- branches/orm/Solar/Example/Model/Users/Record.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Users/Record.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,3 @@
+<?php
+class Solar_Example_Model_Users_Record extends Solar_Sql_Model_Record {
+}
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Users/Setup/table_cols.php
===================================================================
--- branches/orm/Solar/Example/Model/Users/Setup/table_cols.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Users/Setup/table_cols.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,47 @@
+<?php
+return array (
+  'id' => 
+  array (
+    'name' => 'id',
+    'type' => 'int',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => NULL,
+    'require' => true,
+    'primary' => true,
+    'autoinc' => true,
+  ),
+  'created' => 
+  array (
+    'name' => 'created',
+    'type' => 'timestamp',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => '',
+    'require' => true,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+  'updated' => 
+  array (
+    'name' => 'updated',
+    'type' => 'timestamp',
+    'size' => NULL,
+    'scope' => NULL,
+    'default' => '',
+    'require' => true,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+  'handle' => 
+  array (
+    'name' => 'handle',
+    'type' => 'varchar',
+    'size' => 32,
+    'scope' => NULL,
+    'default' => '',
+    'require' => true,
+    'primary' => false,
+    'autoinc' => false,
+  ),
+);
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Users/Setup/table_name.php
===================================================================
--- branches/orm/Solar/Example/Model/Users/Setup/table_name.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Users/Setup/table_name.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,2 @@
+<?php
+return 'test_solar_users';
\ No newline at end of file

Added: branches/orm/Solar/Example/Model/Users.php
===================================================================
--- branches/orm/Solar/Example/Model/Users.php	                        (rev 0)
+++ branches/orm/Solar/Example/Model/Users.php	2007-08-21 14:50:21 UTC (rev 2723)
@@ -0,0 +1,14 @@
+<?php
+class Solar_Example_Model_Users extends Solar_Sql_Model {
+    
+    protected function _setup()
+    {
+        $dir = str_replace('_', DIRECTORY_SEPARATOR, __CLASS__)
+             . DIRECTORY_SEPARATOR
+             . 'Setup'
+             . DIRECTORY_SEPARATOR;
+        
+        $this->_table_name = Solar::run($dir . 'table_name.php');
+        $this->_table_cols = Solar::run($dir . 'table_cols.php');
+    }
+}
\ No newline at end of file




More information about the Solar-svn mailing list