]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/criteria/class_BaseCriteria.php
Continued:
[core.git] / framework / main / classes / criteria / class_BaseCriteria.php
index cb041490fe8cda60b390ca508b3ce1ab7eb2030a..3582f38a025ddafdceb5d10d4a53306a0abef05c 100644 (file)
@@ -114,7 +114,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
                        // Throw it again
-                       throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
+                       throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                } elseif (empty($criteriaKey)) {
                        // Throw it again
                        throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
@@ -207,7 +207,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
                        // Throw it again
-                       throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
+                       throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                }
 
                // Invoke inner method
@@ -296,7 +296,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
                        // Throw it again
-                       throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
+                       throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                }
 
                // Convert dashes to underscore
@@ -339,7 +339,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
                        // Throw it again
-                       throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
+                       throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                }
 
                // Convert dashes to underscore
@@ -375,7 +375,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
                } elseif (is_array($criteriaValue) || is_bool($criteriaValue) || is_object($criteriaValue) || is_resource($criteriaValue)) {
                        // Throw UAE
-                       throw new UnexpectedValueException(sprintf('criteriaValue[]=%s is not accepted', gettype($criteriaValue)));
+                       throw new UnexpectedValueException(sprintf('criteriaValue[]=%s is not accepted', gettype($criteriaValue)), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                }
 
                // Convert dashes to underscore
@@ -411,7 +411,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
                } elseif (is_array($criteriaValue) || is_bool($criteriaValue) || is_object($criteriaValue) || is_resource($criteriaValue)) {
                        // Throw UAE
-                       throw new UnexpectedValueException(sprintf('criteriaValue[]=%s is not accepted', gettype($criteriaValue)));
+                       throw new UnexpectedValueException(sprintf('criteriaValue[]=%s is not accepted', gettype($criteriaValue)), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                }
 
                // Add it with generic method
@@ -449,7 +449,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
                        // Throw it again
-                       throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
+                       throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                }
 
                // Add the configuration entry as a criteria
@@ -486,7 +486,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
                        // Throw it again
-                       throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
+                       throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                }
 
                // Convert dashes to underscore
@@ -574,7 +574,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
                        // Throw it again
-                       throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
+                       throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                }
 
                // First nothing matches and nothing is counted
@@ -602,7 +602,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('%s-CRITERIA: criteriaKey=%s,criteriaValue[%s]=%s', strtoupper($criteriaType), $criteriaKey, gettype($criteriaValue), $criteriaValue));
                                if ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
                                        // Throw it again
-                                       throw new UnexpectedValueException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
+                                       throw new UnexpectedValueException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                                }
 
                                // Convert dashes to underscore
@@ -686,7 +686,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
                        // Throw it again
-                       throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
+                       throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                } elseif (!$this->isValidGenericArrayGroup('criteria', $criteriaType)) {
                        // Not intialized yet
                        throw new BadMethodCallException(sprintf('Method cannot be invoked before criteriaType=%s is initialized!', $criteriaType), FrameworkInterface::EXCEPTION_BAD_METHOD_CALL);
@@ -701,10 +701,10 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('%s-CRITERIA: criteriaKey=%s,criteriaValue[%s]=%s', strtoupper($criteriaType), $criteriaKey, gettype($criteriaValue), $criteriaValue));
                        if ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
                                // Throw UAE
-                               throw new UnexpectedValueException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
+                               throw new UnexpectedValueException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                        } elseif (is_array($criteriaValue) || is_bool($criteriaValue) || is_object($criteriaValue) || is_resource($criteriaValue)) {
                                // Throw it again
-                               throw new UnexpectedValueException(sprintf('criteriaValue[]=%s is not supported', gettype($criteriaValue)));
+                               throw new UnexpectedValueException(sprintf('criteriaValue[]=%s is not supported', gettype($criteriaValue)), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                        }
 
                        // Convert dashes to underscore