]> git.mxchange.org Git - core.git/commitdiff
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 481db262ff9d09989deba22120616f6b587f3582..fab4e559a640c56363f79845b2d64fffaa42ce80 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 e0ca76b3087bd3937aea774d9e4677484b073284..f06a70a16b6a82a4ff32738853114b89ffdbb4b9 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 0f7d2ae64f28cec00c36725424bbf89922234b49..959807d46b69d0844961a7646a9be7f6a279178f 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
                );