[Solar-svn] Revision 2682

pmjones at solarphp.com pmjones at solarphp.com
Thu Aug 9 14:25:42 CDT 2007


Branch: moved Solar_Test_Example to Solar_Example, to make the hierarchy shallower



Modified: branches/orm/Solar/Base.php
===================================================================
--- branches/orm/Solar/Base.php	2007-08-09 19:22:24 UTC (rev 2681)
+++ branches/orm/Solar/Base.php	2007-08-09 19:25:42 UTC (rev 2682)
@@ -101,7 +101,7 @@
             
             // properties only, no config file
             foreach ($parents as $class) {
-                $var = "_$class"; // for example, $_Solar_Test_Example
+                $var = "_$class"; // for example, $_Solar_Example
                 $prop = empty($this->$var) ? null : $this->$var;
                 $this->_config = array_merge(
                     // current values

Modified: branches/orm/Solar/Debug/Var.php
===================================================================
--- branches/orm/Solar/Debug/Var.php	2007-08-09 19:22:24 UTC (rev 2681)
+++ branches/orm/Solar/Debug/Var.php	2007-08-09 19:25:42 UTC (rev 2682)
@@ -45,7 +45,7 @@
  * 
  * {{code: php
  *     // an array to dump as an example
- *     $example = Solar::factory('Solar_Example_Class');
+ *     $example = Solar::factory('Solar_Example');
  *     $example->dump();
  * }}
  * 

Copied: branches/orm/Solar/Example (from rev 2629, branches/orm/Solar/Test/Example)

Modified: branches/orm/Solar/Example/Exception/CustomCondition.php
===================================================================
--- branches/orm/Solar/Test/Example/Exception/CustomCondition.php	2007-07-26 02:57:08 UTC (rev 2629)
+++ branches/orm/Solar/Example/Exception/CustomCondition.php	2007-08-09 19:25:42 UTC (rev 2682)
@@ -24,4 +24,4 @@
  * @package Solar_Test
  * 
  */
-class Solar_Test_Example_Exception_CustomCondition extends Solar_Test_Example_Exception {}
+class Solar_Example_Exception_CustomCondition extends Solar_Example_Exception {}

Modified: branches/orm/Solar/Example/Exception.php
===================================================================
--- branches/orm/Solar/Test/Example/Exception.php	2007-07-26 02:57:08 UTC (rev 2629)
+++ branches/orm/Solar/Example/Exception.php	2007-08-09 19:25:42 UTC (rev 2682)
@@ -24,4 +24,4 @@
  * @package Solar_Test
  * 
  */
-class Solar_Test_Example_Exception extends Solar_Test_Exception {}
+class Solar_Example_Exception extends Solar_Test_Exception {}

Modified: branches/orm/Solar/Example/PageController.php
===================================================================
--- branches/orm/Solar/Test/Example/PageController.php	2007-07-26 02:57:08 UTC (rev 2629)
+++ branches/orm/Solar/Example/PageController.php	2007-08-09 19:25:42 UTC (rev 2682)
@@ -24,7 +24,7 @@
  * @package Solar_Test
  * 
  */
-class Solar_Test_Example_PageController extends Solar_Controller_Page {
+class Solar_Example_PageController extends Solar_Controller_Page {
     
     /**
      * 

Copied: branches/orm/Solar/Example.php (from rev 2629, branches/orm/Solar/Test/Example.php)
===================================================================
--- branches/orm/Solar/Example.php	                        (rev 0)
+++ branches/orm/Solar/Example.php	2007-08-09 19:25:42 UTC (rev 2682)
@@ -0,0 +1,184 @@
+<?php
+/**
+ * 
+ * Example class to support unit tests.
+ * 
+ * @category Solar
+ * 
+ * @package Solar_Test
+ * 
+ * @author Paul M. Jones <pmjones at solarphp.com>
+ * 
+ * @license http://opensource.org/licenses/bsd-license.php BSD
+ * 
+ * @version $Id$
+ * 
+ */
+
+/**
+ * 
+ * Example class to support unit tests.
+ * 
+ * @category Solar
+ * 
+ * @package Solar_Test
+ * 
+ */
+class Solar_Example extends Solar_Base {
+    
+    /**
+     * 
+     * User-defined configuration values.
+     * 
+     * @var array
+     * 
+     */
+    protected $_Solar_Example = array(
+        'foo' => 'bar',
+        'baz' => 'dib',
+        'zim' => 'gir',
+    );
+    
+    /**
+     * 
+     * Protected variable for testing.
+     * 
+     * @var string
+     * 
+     */
+    private $_protected_var = 'semi-visible';
+    
+    /**
+     * 
+     * Private variable for testing.
+     * 
+     * @var string
+     * 
+     */
+    private $_private_var = 'invisible';
+    
+    /**
+     * 
+     * Throws ERR_CUSTOM_CONDITION for this class.
+     * 
+     * @return void
+     * 
+     */
+    public function classSpecificException()
+    {
+        throw $this->_exception('ERR_CUSTOM_CONDITION');
+    }
+    
+    /**
+     * 
+     * Throws ERR_FILE_NOT_FOUND for this class.
+     * 
+     * @return void
+     * 
+     */
+    public function solarSpecificException()
+    {
+        throw $this->_exception('ERR_FILE_NOT_FOUND');
+    }
+    
+    /**
+     * 
+     * Throws ERR_GENERIC_CONDITION for this class.
+     * 
+     * @return void
+     * 
+     */
+    public function classGenericException()
+    {
+        throw $this->_exception('ERR_GENERIC_CONDITION');
+    }
+    
+    /**
+     * 
+     * Throws ERR_NO_SUCH_CONDITION for this class.
+     * 
+     * @return void
+     * 
+     */
+    public function solarGenericException()
+    {
+        throw $this->_exception('ERR_NO_SUCH_CONDITION');
+    }
+    
+    /**
+     * 
+     * Throws a user-specified error code for this class.
+     * 
+     * @param string $code The error code to throw.
+     * 
+     * @return void
+     * 
+     */
+    public function exceptionFromCode($code) {
+        throw $this->_exception($code);
+    }
+    
+    /**
+     * 
+     * Used for testing Solar_Filter::callback() as an instance method.
+     * 
+     * @param string $value The value to filter.
+     * 
+     * @param mixed $find Find this string in the value.
+     * 
+     * @param mixed $with Replace with this string.
+     * 
+     * @return string The filtered value.
+     * 
+     */
+    public function filterCallback($value, $find, $with)
+    {
+        return str_replace($find, $with, $value);
+    }
+    
+    /**
+     * 
+     * Used for testing Solar_Filter::callback() as a static method.
+     * 
+     * @param string $value The value to filter.
+     * 
+     * @param mixed $find Find this string in the value.
+     * 
+     * @param mixed $with Replace with this string.
+     * 
+     * @return string The filtered value.
+     * 
+     */
+    public static function staticFilterCallback($value, $find, $with)
+    {
+        return str_replace($find, $with, $value);
+    }
+    
+    /**
+     * 
+     * Used for testing Solar_Valid::callback() as an instance method.
+     * 
+     * @param mixed $value The value to validate with is_int().
+     * 
+     * @return bool True if $value is_int(), false if not.
+     * 
+     */
+    public function validIsInt($value)
+    {
+        return is_int($value);
+    }
+    
+    /**
+     * 
+     * Used for testing Solar_Valid::callback() as a static method.
+     * 
+     * @param mixed $value The value to validate with is_int().
+     * 
+     * @return bool True if $value is_int(), false if not.
+     * 
+     */
+    static public function staticValidIsInt($value)
+    {
+        return is_int($value);
+    }
+}

Deleted: branches/orm/Solar/Test/Example.php
===================================================================
--- branches/orm/Solar/Test/Example.php	2007-08-09 19:22:24 UTC (rev 2681)
+++ branches/orm/Solar/Test/Example.php	2007-08-09 19:25:42 UTC (rev 2682)
@@ -1,184 +0,0 @@
-<?php
-/**
- * 
- * Example class to support unit tests.
- * 
- * @category Solar
- * 
- * @package Solar_Test
- * 
- * @author Paul M. Jones <pmjones at solarphp.com>
- * 
- * @license http://opensource.org/licenses/bsd-license.php BSD
- * 
- * @version $Id$
- * 
- */
-
-/**
- * 
- * Example class to support unit tests.
- * 
- * @category Solar
- * 
- * @package Solar_Test
- * 
- */
-class Solar_Test_Example extends Solar_Base {
-    
-    /**
-     * 
-     * User-defined configuration values.
-     * 
-     * @var array
-     * 
-     */
-    protected $_Solar_Test_Example = array(
-        'foo' => 'bar',
-        'baz' => 'dib',
-        'zim' => 'gir',
-    );
-    
-    /**
-     * 
-     * Protected variable for testing.
-     * 
-     * @var string
-     * 
-     */
-    private $_protected_var = 'semi-visible';
-    
-    /**
-     * 
-     * Private variable for testing.
-     * 
-     * @var string
-     * 
-     */
-    private $_private_var = 'invisible';
-    
-    /**
-     * 
-     * Throws ERR_CUSTOM_CONDITION for this class.
-     * 
-     * @return void
-     * 
-     */
-    public function classSpecificException()
-    {
-        throw $this->_exception('ERR_CUSTOM_CONDITION');
-    }
-    
-    /**
-     * 
-     * Throws ERR_FILE_NOT_FOUND for this class.
-     * 
-     * @return void
-     * 
-     */
-    public function solarSpecificException()
-    {
-        throw $this->_exception('ERR_FILE_NOT_FOUND');
-    }
-    
-    /**
-     * 
-     * Throws ERR_GENERIC_CONDITION for this class.
-     * 
-     * @return void
-     * 
-     */
-    public function classGenericException()
-    {
-        throw $this->_exception('ERR_GENERIC_CONDITION');
-    }
-    
-    /**
-     * 
-     * Throws ERR_NO_SUCH_CONDITION for this class.
-     * 
-     * @return void
-     * 
-     */
-    public function solarGenericException()
-    {
-        throw $this->_exception('ERR_NO_SUCH_CONDITION');
-    }
-    
-    /**
-     * 
-     * Throws a user-specified error code for this class.
-     * 
-     * @param string $code The error code to throw.
-     * 
-     * @return void
-     * 
-     */
-    public function exceptionFromCode($code) {
-        throw $this->_exception($code);
-    }
-    
-    /**
-     * 
-     * Used for testing Solar_Filter::callback() as an instance method.
-     * 
-     * @param string $value The value to filter.
-     * 
-     * @param mixed $find Find this string in the value.
-     * 
-     * @param mixed $with Replace with this string.
-     * 
-     * @return string The filtered value.
-     * 
-     */
-    public function filterCallback($value, $find, $with)
-    {
-        return str_replace($find, $with, $value);
-    }
-    
-    /**
-     * 
-     * Used for testing Solar_Filter::callback() as a static method.
-     * 
-     * @param string $value The value to filter.
-     * 
-     * @param mixed $find Find this string in the value.
-     * 
-     * @param mixed $with Replace with this string.
-     * 
-     * @return string The filtered value.
-     * 
-     */
-    public static function staticFilterCallback($value, $find, $with)
-    {
-        return str_replace($find, $with, $value);
-    }
-    
-    /**
-     * 
-     * Used for testing Solar_Valid::callback() as an instance method.
-     * 
-     * @param mixed $value The value to validate with is_int().
-     * 
-     * @return bool True if $value is_int(), false if not.
-     * 
-     */
-    public function validIsInt($value)
-    {
-        return is_int($value);
-    }
-    
-    /**
-     * 
-     * Used for testing Solar_Valid::callback() as a static method.
-     * 
-     * @param mixed $value The value to validate with is_int().
-     * 
-     * @return bool True if $value is_int(), false if not.
-     * 
-     */
-    static public function staticValidIsInt($value)
-    {
-        return is_int($value);
-    }
-}




More information about the Solar-svn mailing list