Added a public methods to interface + some logger messages.
[core.git] / inc / classes / main / criteria / class_BaseCriteria.php
index 400ed06c4b7f46417a721930e5e43a03946782f4..1abb7afe9f531fc8089f085bbf79a4fd30b28434 100644 (file)
@@ -161,6 +161,9 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
         * @return      void
         */
        public final function addCriteria ($criteriaKey, $criteriaValue, $criteriaType = 'default') {
+               // Debug message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue . ',criteriaType=' . $criteriaType . ' - CALLED!');
+
                // Make sure no 'my-' or 'my_' passes this point
                assert((strpos($criteriaKey, 'my-') === FALSE) && (strpos($criteriaKey, 'my_') === FALSE) && (!is_bool($criteriaValue)));
 
@@ -168,7 +171,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                $criteriaKey = self::convertDashesToUnderscores($criteriaKey);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey);
 
                // Append it
                $this->appendStringToGenericArrayElement('criteria', $criteriaType, 'entries', $criteriaKey, $criteriaValue);
@@ -228,6 +231,9 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
         * @return      $value                  Whether the value of the critera or FALSE
         */
        public function getCriteriaElemnent ($criteriaKey, $criteriaType = 'default') {
+               // Debug message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteriaType=' . $criteriaType . ' - CALLED!');
+
                // Make sure no 'my-' or 'my_' passes this point
                assert((strpos($criteriaKey, 'my-') === FALSE) && (strpos($criteriaKey, 'my_') === FALSE));
 
@@ -235,7 +241,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                $criteriaKey = self::convertDashesToUnderscores($criteriaKey);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteria()=' . $this->countGenericArrayGroup('criteria', $criteriaType)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteria()=' . $this->countGenericArrayGroup('criteria', $criteriaType));
 
                // Default is not found
                $value = FALSE;
@@ -246,6 +252,9 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        $value = $this->getGenericArrayElement('criteria', $criteriaType, 'entries', $criteriaKey);
                } // END - if
 
+               // Debug message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: value=' . $value . ' - EXIT!');
+
                // Return the value
                return $value;
        }