summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/PradoBase.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/framework/PradoBase.php b/framework/PradoBase.php
index e60daafb..4b3003ca 100644
--- a/framework/PradoBase.php
+++ b/framework/PradoBase.php
@@ -271,6 +271,12 @@ class PradoBase
self::$classExists[$type] = class_exists($type, false);
}
+ /*
+ * Old apps compatibility support: if the component name has been specified using the
+ * old namespace syntax (eg. Application.Common.MyDataModule), assume that the calling
+ * code expects the class not to be php5.3-namespaced (eg: MyDataModule instead of
+ * \Application\Common\MyDataModule)
+ */
if( ($pos = strrpos($type, '\\')) !== false & ($requestedType != $type))
$type = substr($type,$pos+1);
@@ -336,7 +342,7 @@ class PradoBase
}
}
- if($checkClassExistence && !class_exists($namespace,false))
+ if($checkClassExistence && !class_exists($namespace,false) && !interface_exists($namespace,false))
throw new TInvalidOperationException('prado_component_unknown',$namespace,'');
}
else if(($path=self::getPathOfNamespace($namespace,self::CLASS_FILE_EXT))!==null)