[Solar-svn] Revision 2772

pmjones at solarphp.com pmjones at solarphp.com
Sun Sep 23 15:19:52 CDT 2007


branch: Solar_Sql_Model*: [BRK] Renamed Model::$_indexes to Model::$_index




Modified: branches/orm/Solar/Sql/Model/Catalog.php
===================================================================
--- branches/orm/Solar/Sql/Model/Catalog.php	2007-09-23 20:12:26 UTC (rev 2771)
+++ branches/orm/Solar/Sql/Model/Catalog.php	2007-09-23 20:19:52 UTC (rev 2772)
@@ -178,7 +178,7 @@
         // follow-on cleanup of critical user-defined values
         $this->_fixStack($model);
         $this->_fixTableName($model);
-        $this->_fixIndexes($model);
+        $this->_fixIndex($model);
         $this->_fixTableCols($model);
         $this->_fixModelName($model);
         $this->_fixOrder($model);
@@ -1128,14 +1128,14 @@
     
     /**
      * 
-     * Fixes $this->_indexes listings.
+     * Fixes $this->_index listings.
      * 
      * @param StdClass $model The model property catalog.
      * 
      * @return void
      * 
      */
-    protected function _fixIndexes($model)
+    protected function _fixIndex($model)
     {
         // baseline index definition
         $baseidx = array(
@@ -1145,7 +1145,7 @@
         );
         
         // fix up each index to have a full set of info
-        foreach ($model->_indexes as $key => $val) {
+        foreach ($model->_index as $key => $val) {
             
             if (is_int($key) && is_string($val)) {
                 // array('col')
@@ -1168,14 +1168,14 @@
                 settype($info['cols'], 'array');
             }
             
-            $model->_indexes[$key] = $info;
+            $model->_index[$key] = $info;
         }
     }
     
     /**
      * 
      * Creates the table and indexes in the database using $model->_table_cols
-     * and $model->_indexes.
+     * and $model->_index.
      * 
      * @param StdClass $model The model property catalog.
      * 
@@ -1195,7 +1195,7 @@
         /**
          * Create the indexes.
          */
-        foreach ($model->_indexes as $name => $info) {
+        foreach ($model->_index as $name => $info) {
             try {
                 // create this index
                 $this->_sql->createIndex(

Modified: branches/orm/Solar/Sql/Model.php
===================================================================
--- branches/orm/Solar/Sql/Model.php	2007-09-23 20:12:26 UTC (rev 2771)
+++ branches/orm/Solar/Sql/Model.php	2007-09-23 20:19:52 UTC (rev 2772)
@@ -193,14 +193,14 @@
      * 
      *     // index on a single column:
      *     // CREATE INDEX idx_name ON table_name (col_name)
-     *     $this->_indexes['idx_name'] = array(
+     *     $this->_index['idx_name'] = array(
      *         'type' => $type,
      *         'cols' => 'col_name'
      *     );
      * 
      *     // index on multiple columns:
      *     // CREATE INDEX idx_name ON table_name (col_1, col_2, ... col_N)
-     *     $this->_indexes['idx_name'] = array(
+     *     $this->_index['idx_name'] = array(
      *         'type' => $type,
      *         'cols' => array('col_1', 'col_2', ..., 'col_N')
      *     );
@@ -208,7 +208,7 @@
      *     // easy shorthand for an index on a single column,
      *     // giving the index the same name as the column:
      *     // CREATE INDEX col_name ON table_name (col_name)
-     *     $this->_indexes['col_name'] = $type;
+     *     $this->_index['col_name'] = $type;
      * }}
      * 
      * The $type may be 'normal' or 'unique'.
@@ -216,7 +216,7 @@
      * @var array
      * 
      */
-    protected $_indexes = array();
+    protected $_index = array();
     
     // -----------------------------------------------------------------
     //




More information about the Solar-svn mailing list