Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 1 Jan 2018 03:51:59 +0000 (04:51 +0100)
committerRoland Häder <roland@mxchange.org>
Mon, 1 Jan 2018 03:51:59 +0000 (04:51 +0100)
- also "documented" namespace expansion (Tld\Domain\) in thrown exceptions

Signed-off-by: Roland Häder <roland@mxchange.org>
framework/loader/class_ClassLoader.php
framework/main/classes/factories/objects/class_ObjectFactory.php
framework/main/exceptions/main/class_InvalidClassNameException.php

index 481db26..fab4e55 100644 (file)
@@ -550,7 +550,7 @@ class ClassLoader {
                // At least 3 parts should be there
                if ((self::$strictNamingConvention === true) && (count($classNameParts) < 5)) {
                        // Namespace scheme is: Project\Package[\SubPackage...]
-                       throw new InvalidArgumentException(sprintf('Class name "%s" is not conform to naming-convention: Project\Package[\SubPackage...]\SomeFooBar', $className));
+                       throw new InvalidArgumentException(sprintf('Class name "%s" is not conform to naming-convention: Tld\Domain\Project\Package[\SubPackage...]\SomeFooBar', $className));
                } // END - if
 
                // Get last element
index e0ca76b..f06a70a 100644 (file)
@@ -70,7 +70,7 @@ class ObjectFactory extends BaseFactory {
                        throw new NoClassException(array($factoryInstance, $className), self::EXCEPTION_CLASS_NOT_FOUND);
                } elseif (count($classNameParts) < 3) {
                        // Namespaces are missing
-                       throw new InvalidArgumentException(sprintf('Class name "%s" is not conform to naming-convention: Project\Package[\SubPackage...]\SomeFooBar', $className));
+                       throw new InvalidArgumentException(sprintf('Class name "%s" is not conform to naming-convention: Tld\Domain\Project\Package[\SubPackage...]\SomeFooBar', $className));
                }
 
                // Create method name
index 0f7d2ae..959807d 100644 (file)
@@ -39,7 +39,7 @@ class InvalidClassNameException extends FrameworkException {
         */
        public function __construct ($className, $code) {
                // Add a message around the missing class
-               $message = sprintf('[%d]: Class name "%s" is not conform to naming-convention: Project\Package[\SubPackage...]\SomeFooBar',
+               $message = sprintf('[%d]: Class name "%s" is not conform to naming-convention: Tld\Domain\Project\Package[\SubPackage...]\SomeFooBar',
                        $this->getLine(),
                        $className
                );