]> git.andy128k.dev Git - ipf-legacy-orm.git/commitdiff
fix orm exception
authorAndrey Kutejko <andy128k@gmail.com>
Sun, 23 Jun 2013 14:25:53 +0000 (17:25 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Sun, 23 Jun 2013 14:25:53 +0000 (17:25 +0300)
ipf/orm.php
ipf/orm/exception/orm.php

index d3427c36e2b310191b8c9b505afb6e28d7d8a025..caef4cd9dcf9e12a0c194cd8dcd0eef99aa6c664 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
-final class IPF_ORM {
+final class IPF_ORM
+{
     const ERR                       = -1;
     const ERR_SYNTAX                = -2;
     const ERR_CONSTRAINT            = -3;
@@ -178,9 +179,7 @@ final class IPF_ORM {
 
     private static $_loadedModelFiles = array();
 
-    public function __construct(){
-        throw new IPF_Exception_Base('IPF_Const is static class. No instances can be created.');
-    }    
+    private function __construct() {}
 
     public static function getTable($componentName)
     {
index e57b5d5c81ca27ab6c34dc573af511c2bab4f2b4..d7d84e9e9e42c12b288433bc254a58f9297d5a24 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
-class IPF_ORM_Exception extends IPF_Exception_Base{
+class IPF_ORM_Exception extends IPF_Exception
+{
     protected static $_errorMessages = array(
         IPF_ORM::ERR                    => 'unknown error',
         IPF_ORM::ERR_ALREADY_EXISTS     => 'already exists',
@@ -45,9 +46,5 @@ class IPF_ORM_Exception extends IPF_Exception_Base{
         return isset(self::$_errorMessages[$value]) ?
            self::$_errorMessages[$value] : self::$_errorMessages[IPF_ORM::ERR];
     }
-
 }
 
-
-
-