Debugging continued:
authorRoland Haeder <roland@mxchange.org>
Thu, 23 Feb 2017 20:47:59 +0000 (21:47 +0100)
committerRoland Haeder <roland@mxchange.org>
Tue, 28 Feb 2017 21:10:04 +0000 (22:10 +0100)
- BaseFrameworkSystem::createDebugInstance() now supports optional line number
  to trace where the call was made

Signed-off-by: Roland Häder <roland@mxchange.org>
55 files changed:
application/tests/class_ApplicationHelper.php
inc/database.php
inc/main/classes/cache/class_MemoryCache.php
inc/main/classes/class_BaseFrameworkSystem.php
inc/main/classes/client/http/class_HttpClient.php
inc/main/classes/commands/console/class_ConsoleFuseCommand.php
inc/main/classes/console/class_ConsoleTools.php
inc/main/classes/container/socket/class_SocketContainer.php
inc/main/classes/controller/class_BaseController.php
inc/main/classes/criteria/class_BaseCriteria.php
inc/main/classes/criteria/dataset/class_DataSetCriteria.php
inc/main/classes/criteria/search/class_SearchCriteria.php
inc/main/classes/database/backend/class_CachedLocalFileDatabase.php
inc/main/classes/database/class_BaseDatabaseWrapper.php
inc/main/classes/database/result/class_CachedDatabaseResult.php
inc/main/classes/feature/class_FrameworkFeature.php
inc/main/classes/file_directories/binary/class_BaseBinaryFile.php
inc/main/classes/file_directories/binary/index/class_IndexFile.php
inc/main/classes/file_directories/binary/stack/class_StackFile.php
inc/main/classes/file_directories/class_BaseAbstractFile.php
inc/main/classes/file_directories/class_BaseFileIo.php
inc/main/classes/file_directories/directory/class_FrameworkDirectoryPointer.php
inc/main/classes/file_directories/io_stream/class_FileIoStream.php
inc/main/classes/file_directories/text/class_BaseTextFile.php
inc/main/classes/file_directories/text/input/csv/class_CsvInputFile.php
inc/main/classes/filter/class_FilterChain.php
inc/main/classes/handler/raw_data/class_BaseDataHandler.php
inc/main/classes/handler/tasks/class_TaskHandler.php
inc/main/classes/helper/class_BaseHelper.php
inc/main/classes/index/class_BaseIndex.php
inc/main/classes/index/file_stack/class_FileStackIndex.php
inc/main/classes/iterator/file/class_FileIterator.php
inc/main/classes/listener/class_BaseListener.php
inc/main/classes/listener/class_BaseListenerDecorator.php
inc/main/classes/listener/socket/class_SocketFileListener.php
inc/main/classes/lists/class_BaseList.php
inc/main/classes/menu/class_BaseMenu.php
inc/main/classes/output/console/class_ConsoleOutput.php
inc/main/classes/output/debug/console/class_DebugConsoleOutput.php
inc/main/classes/output/debug/error/class_DebugErrorLogOutput.php
inc/main/classes/output/debug/web/class_DebugWebOutput.php
inc/main/classes/output/web/class_WebOutput.php
inc/main/classes/parser/xml/class_XmlParser.php
inc/main/classes/registry/class_BaseRegistry.php
inc/main/classes/resolver/controller/class_BaseControllerResolver.php
inc/main/classes/response/class_BaseResponse.php
inc/main/classes/stacker/file/class_BaseFileStack.php
inc/main/classes/streams/crypto/class_McryptStream.php
inc/main/classes/streams/crypto/class_NullCryptoStream.php
inc/main/classes/tasks/idle/class_IdleLoopTask.php
inc/main/classes/template/class_BaseTemplateEngine.php
inc/main/classes/visitor/tasks/class_ActiveTaskVisitor.php
inc/main/middleware/compressor/class_CompressorChannel.php
inc/main/middleware/database/class_DatabaseConnection.php
inc/main/middleware/io/class_FileIoHandler.php

index 670cf90154f3b7d5a6cff606dca63036ae6dc016..a65e2966681977184bca72762258d7ff6d943f35 100644 (file)
@@ -212,9 +212,9 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                // -------------------------- Shutdown phase --------------------------
                // Shutting down the hub by saying "good bye" to all connected peers
                // and other hubs, flushing all queues and caches.
                // -------------------------- Shutdown phase --------------------------
                // Shutting down the hub by saying "good bye" to all connected peers
                // and other hubs, flushing all queues and caches.
-               self::createDebugInstance(__CLASS__)->debugOutput('MAIN: Shutdown in progress, main loop exited.');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: Shutdown in progress, main loop exited.');
                $this->getControllerInstance()->executeShutdownFilters($requestInstance, $responseInstance);
                $this->getControllerInstance()->executeShutdownFilters($requestInstance, $responseInstance);
-               self::createDebugInstance(__CLASS__)->debugOutput('MAIN: Shutdown completed. (This is the last line.)');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: Shutdown completed. (This is the last line.)');
        }
 
        /**
        }
 
        /**
index 88a69a6af4caf9c82ee10c8096a03e3ca1cde2c8..6bcb51535ef8774d45d01915e0720458e35e4cd6 100644 (file)
@@ -54,4 +54,6 @@ $connectionInstance = DatabaseConnection::createDatabaseConnection(DebugMiddlewa
 
 // Is the app variable there and valid?
 // @TODO Rewrite this
 
 // Is the app variable there and valid?
 // @TODO Rewrite this
-if (is_object($app)) $app->setDatabaseInstance($connectionInstance);
+if (is_object($app)) {
+       $app->setDatabaseInstance($connectionInstance);
+} // END - if
index a3bdbd60a785e362391deb78984851c3c83952c1..fb926f431fc18e4e08fc415b806a546b6df382d4 100644 (file)
@@ -142,7 +142,7 @@ class MemoryCache extends BaseFrameworkSystem implements Cacheable {
                // Is the offset there?
                if ($this->offsetExists($offset)) {
                        // Purge only existing keys
                // Is the offset there?
                if ($this->offsetExists($offset)) {
                        // Purge only existing keys
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CACHE: Unsetting cache ' . $offset);
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CACHE: Unsetting cache ' . $offset);
                        $this->dataCache->offsetUnset($offset);
                } // END - if
        }
                        $this->dataCache->offsetUnset($offset);
                } // END - if
        }
index 8f42032ff98dcdfc3c624c4e67fdcbc075d9a311..4ad02eda4ed88e3e21542f8fd2cff71e5643c855 100644 (file)
@@ -477,7 +477,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                        $this->setRealClass('DestructedObject');
                } elseif ((defined('DEBUG_DESTRUCTOR')) && (is_object($this->getDebugInstance()))) {
                        // Already destructed object
                        $this->setRealClass('DestructedObject');
                } elseif ((defined('DEBUG_DESTRUCTOR')) && (is_object($this->getDebugInstance()))) {
                        // Already destructed object
-                       self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:] The object <span class="object_name">%s</span> is already destroyed.',
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:] The object <span class="object_name">%s</span> is already destroyed.',
                                __CLASS__,
                                $this->__toString()
                        ));
                                __CLASS__,
                                $this->__toString()
                        ));
@@ -567,7 +567,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
 
                // Output stub message
                // @TODO __CLASS__ does always return BaseFrameworkSystem but not the extending (=child) class
 
                // Output stub message
                // @TODO __CLASS__ does always return BaseFrameworkSystem but not the extending (=child) class
-               self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[unknown::%s:] Stub! Args: %s',
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[unknown::%s:] Stub! Args: %s',
                        $methodName,
                        $argsString
                ));
                        $methodName,
                        $argsString
                ));
@@ -1201,7 +1201,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         * @return      void
         */
        public final function setSocketResource ($socketResource) {
         * @return      void
         */
        public final function setSocketResource ($socketResource) {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($this->__toString() . '::' . __FUNCTION__ . ': socketResource=' . $socketResource . ',previous[' . gettype($this->socketResource) . ']=' . $this->socketResource);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput($this->__toString() . '::' . __FUNCTION__ . ': socketResource=' . $socketResource . ',previous[' . gettype($this->socketResource) . ']=' . $this->socketResource);
                $this->socketResource = $socketResource;
        }
 
                $this->socketResource = $socketResource;
        }
 
@@ -1211,7 +1211,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         * @return      $socketResource         A valid socket resource
         */
        public final function getSocketResource () {
         * @return      $socketResource         A valid socket resource
         */
        public final function getSocketResource () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($this->__toString() . '::' . __FUNCTION__ . ': socketResource[' . gettype($this->socketResource) . ']=' . $this->socketResource);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput($this->__toString() . '::' . __FUNCTION__ . ': socketResource[' . gettype($this->socketResource) . ']=' . $this->socketResource);
                return $this->socketResource;
        }
 
                return $this->socketResource;
        }
 
@@ -1222,7 +1222,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         * @return      void
         */
        public final function setRegularExpression ($regularExpression) {
         * @return      void
         */
        public final function setRegularExpression ($regularExpression) {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($this->__toString() . '::' . __FUNCTION__ . ': regularExpression=' . $regularExpression . ',previous[' . gettype($this->regularExpression) . ']=' . $this->regularExpression);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput($this->__toString() . '::' . __FUNCTION__ . ': regularExpression=' . $regularExpression . ',previous[' . gettype($this->regularExpression) . ']=' . $this->regularExpression);
                $this->regularExpression = $regularExpression;
        }
 
                $this->regularExpression = $regularExpression;
        }
 
@@ -1232,7 +1232,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         * @return      $regularExpression      A valid regular expression
         */
        public final function getRegularExpression () {
         * @return      $regularExpression      A valid regular expression
         */
        public final function getRegularExpression () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($this->__toString() . '::' . __FUNCTION__ . ': regularExpression[' . gettype($this->regularExpression) . ']=' . $this->regularExpression);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput($this->__toString() . '::' . __FUNCTION__ . ': regularExpression[' . gettype($this->regularExpression) . ']=' . $this->regularExpression);
                return $this->regularExpression;
        }
 
                return $this->regularExpression;
        }
 
@@ -1861,7 +1861,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                // Debug instance is there?
                if (!is_null($this->getDebugInstance())) {
                        // Output stub message
                // Debug instance is there?
                if (!is_null($this->getDebugInstance())) {
                        // Output stub message
-                       self::createDebugInstance(__CLASS__)->debugOutput($stubMessage);
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput($stubMessage);
                } else {
                        // Trigger an error
                        trigger_error($stubMessage);
                } else {
                        // Trigger an error
                        trigger_error($stubMessage);
@@ -1897,10 +1897,11 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         * Creates an instance of a debugger instance
         *
         * @param       $className              Name of the class (currently unsupported)
         * Creates an instance of a debugger instance
         *
         * @param       $className              Name of the class (currently unsupported)
+        * @param       $lineNumber             Line number where the call was made
         * @return      $debugInstance  An instance of a debugger class
         * @deprecated  Not fully, as the new Logger facilities are not finished yet.
         */
         * @return      $debugInstance  An instance of a debugger class
         * @deprecated  Not fully, as the new Logger facilities are not finished yet.
         */
-       public final static function createDebugInstance ($className) {
+       public final static function createDebugInstance ($className, $lineNumber = NULL) {
                // Is the instance set?
                if (!Registry::getRegistry()->instanceExists('debug')) {
                        // Init debug instance
                // Is the instance set?
                if (!Registry::getRegistry()->instanceExists('debug')) {
                        // Init debug instance
@@ -1912,7 +1913,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                                $debugInstance = DebugMiddleware::createDebugMiddleware(FrameworkConfiguration::getSelfInstance()->getConfigEntry('debug_' . self::getResponseTypeFromSystem() . '_class'), $className);
                        } catch (NullPointerException $e) {
                                // Didn't work, no instance there
                                $debugInstance = DebugMiddleware::createDebugMiddleware(FrameworkConfiguration::getSelfInstance()->getConfigEntry('debug_' . self::getResponseTypeFromSystem() . '_class'), $className);
                        } catch (NullPointerException $e) {
                                // Didn't work, no instance there
-                               exit('Cannot create debugInstance! Exception=' . $e->__toString() . ', message=' . $e->getMessage());
+                               exit(sprintf('Cannot create debugInstance! Exception=%s,message=%s,className=%s,lineNumber=%d' . PHP_EOL, $e->__toString(), $e->getMessage(), $className, $lineNumber));
                        }
 
                        // Empty string should be ignored and used for testing the middleware
                        }
 
                        // Empty string should be ignored and used for testing the middleware
@@ -2185,7 +2186,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
 
                // Get current array
                $fieldArray = $resultInstance->current();
 
                // Get current array
                $fieldArray = $resultInstance->current();
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($fieldName.':<pre>'.print_r($fieldArray, TRUE).'</pre>');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput($fieldName.':<pre>'.print_r($fieldArray, TRUE).'</pre>');
 
                // Convert dashes to underscore
                $fieldName2 = self::convertDashesToUnderscores($fieldName);
 
                // Convert dashes to underscore
                $fieldName2 = self::convertDashesToUnderscores($fieldName);
@@ -2196,10 +2197,10 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                        $fieldValue = $fieldArray[$fieldName2];
                } elseif (defined('DEVELOPER')) {
                        // Missing field entry, may require debugging
                        $fieldValue = $fieldArray[$fieldName2];
                } elseif (defined('DEVELOPER')) {
                        // Missing field entry, may require debugging
-                       self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']:fieldArray<pre>=' . print_r($fieldArray, TRUE) . '</pre>,fieldName=' . $fieldName . ' not found!');
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']:fieldArray<pre>=' . print_r($fieldArray, TRUE) . '</pre>,fieldName=' . $fieldName . ' not found!');
                } else {
                        // Missing field entry, may require debugging
                } else {
                        // Missing field entry, may require debugging
-                       self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']:fieldName=' . $fieldName . ' not found!');
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']:fieldName=' . $fieldName . ' not found!');
                }
 
                // Return it
                }
 
                // Return it
@@ -2225,7 +2226,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
 
                // Get current array
                $fieldArray = $resultInstance->current();
 
                // Get current array
                $fieldArray = $resultInstance->current();
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . $this->__toString() . ':' . __LINE__ . '] fieldName=' . $fieldName . ',fieldArray=<pre>'.print_r($fieldArray, TRUE).'</pre>');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . $this->__toString() . ':' . __LINE__ . '] fieldName=' . $fieldName . ',fieldArray=<pre>'.print_r($fieldArray, TRUE).'</pre>');
 
                // Convert dashes to underscore
                $fieldName = self::convertDashesToUnderscores($fieldName);
 
                // Convert dashes to underscore
                $fieldName = self::convertDashesToUnderscores($fieldName);
@@ -2272,7 +2273,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                        // Debug instance is there?
                        if (!is_null($this->getDebugInstance())) {
                                // Output stub message
                        // Debug instance is there?
                        if (!is_null($this->getDebugInstance())) {
                                // Output stub message
-                               self::createDebugInstance(__CLASS__)->debugOutput($message);
+                               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput($message);
                        } else {
                                // Trigger an error
                                trigger_error($message . "<br />\n");
                        } else {
                                // Trigger an error
                                trigger_error($message . "<br />\n");
@@ -2460,7 +2461,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         */
        protected function hex2asc ($hex) {
                // Check for length, it must be devideable by 2
         */
        protected function hex2asc ($hex) {
                // Check for length, it must be devideable by 2
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('hex='.$hex);
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('hex='.$hex);
                assert((strlen($hex) % 2) == 0);
 
                // Walk the string
                assert((strlen($hex) % 2) == 0);
 
                // Walk the string
@@ -2528,7 +2529,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                );
 
                // And return it
                );
 
                // And return it
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($this->__toString() . ': cacheKey=' . $cacheKey);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput($this->__toString() . ': cacheKey=' . $cacheKey);
                return $cacheKey;
        }
 
                return $cacheKey;
        }
 
@@ -3311,7 +3312,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         */
        protected function packString ($str) {
                // Debug message
         */
        protected function packString ($str) {
                // Debug message
-               //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__)->debugOutput('str=' . $str . ' - CALLED!');
+               //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('str=' . $str . ' - CALLED!');
 
                // First compress the string (gzcompress is okay)
                $str = gzcompress($str);
 
                // First compress the string (gzcompress is okay)
                $str = gzcompress($str);
@@ -3346,7 +3347,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                } // END - for
 
                // Return it
                } // END - for
 
                // Return it
-               //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__)->debugOutput('packed=' . $packed . ' - EXIT!');
+               //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('packed=' . $packed . ' - EXIT!');
                return $packed;
        }
 
                return $packed;
        }
 
index bd06c93f60e1593831d45c4dc59b379722420380..1c89e94228d6ae1e3899a65bd482306842f8bf3b 100644 (file)
@@ -121,7 +121,7 @@ class HttpClient extends BaseClient implements Client {
 
                // Add last new-line
                $rawRequest .= self::HTTP_EOL;
 
                // Add last new-line
                $rawRequest .= self::HTTP_EOL;
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('HTTP-CLIENT[' . __METHOD__ . ':' . __LINE__ . ']: rawRequest=' . $rawRequest);
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HTTP-CLIENT[' . __METHOD__ . ':' . __LINE__ . ']: rawRequest=' . $rawRequest);
 
                // Write request
                fwrite($this->getSocketResource(), $rawRequest);
 
                // Write request
                fwrite($this->getSocketResource(), $rawRequest);
index f30aac8a758f5f239375d4c69f46ae77c1602d68..01fd52364a340e6a779ae7439791a2a3c599b589 100644 (file)
@@ -63,7 +63,7 @@ class ConsoleFuseCommand extends BaseCommand implements Commandable {
                // Is the feature available?
                if (!FrameworkFeature::isFeatureAvailable('fuse')) {
                        // Feature not available, cannot continue
                // Is the feature available?
                if (!FrameworkFeature::isFeatureAvailable('fuse')) {
                        // Feature not available, cannot continue
-                       self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Feature "hub" not available.',
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Feature "hub" not available.',
                                __METHOD__,
                                __LINE__
                        ));
                                __METHOD__,
                                __LINE__
                        ));
index 4babb5e478def12b46b7f581696589089835b1e8..04476bf507d0092faa0dc58abf0fba4957f3f022 100644 (file)
@@ -54,7 +54,7 @@ class ConsoleTools extends BaseFrameworkSystem {
         */
        protected function resolveIpAddress ($hostname) {
                // Debug message
         */
        protected function resolveIpAddress ($hostname) {
                // Debug message
-               self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:] Host name to resolve is: %s',
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:] Host name to resolve is: %s',
                        $this->__toString(),
                        $hostname
                ));
                        $this->__toString(),
                        $hostname
                ));
@@ -72,13 +72,13 @@ class ConsoleTools extends BaseFrameworkSystem {
                        $ip = $ipResolved;
 
                        // Debug message
                        $ip = $ipResolved;
 
                        // Debug message
-                       self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:] Resolved IP address is: %s',
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:] Resolved IP address is: %s',
                                $this->__toString(),
                                $ip
                        ));
                } else {
                        // Problem while resolving IP address
                                $this->__toString(),
                                $ip
                        ));
                } else {
                        // Problem while resolving IP address
-                       self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:] Problem resolving IP address for host %s. Please check your /etc/hosts file.',
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:] Problem resolving IP address for host %s. Please check your /etc/hosts file.',
                                $this->__toString(),
                                $hostname
                        ));
                                $this->__toString(),
                                $hostname
                        ));
@@ -131,7 +131,7 @@ class ConsoleTools extends BaseFrameworkSystem {
 
                // Add last new-line
                $proxyTunnel .= self::HTTP_EOL;
 
                // Add last new-line
                $proxyTunnel .= self::HTTP_EOL;
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONSOLE-TOOLS[' . __METHOD__ . ':' . __LINE__ . ']: proxyTunnel=' . $proxyTunnel);
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONSOLE-TOOLS[' . __METHOD__ . ':' . __LINE__ . ']: proxyTunnel=' . $proxyTunnel);
 
                // Write request
                fwrite($socketResource, $proxyTunnel);
 
                // Write request
                fwrite($socketResource, $proxyTunnel);
@@ -238,13 +238,13 @@ class ConsoleTools extends BaseFrameworkSystem {
                                $ip = $helperInstance->resolveIpAddress($_SERVER['COMPUTERNAME']);
                        } else {
                                // Could not find our hostname
                                $ip = $helperInstance->resolveIpAddress($_SERVER['COMPUTERNAME']);
                        } else {
                                // Could not find our hostname
-                               self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:] WARNING: Cannot resolve my own IP address.',
+                               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:] WARNING: Cannot resolve my own IP address.',
                                        $helperInstance->__toString()
                                ));
                        }
                } catch (FrameworkException $e) {
                        // Output debug message
                                        $helperInstance->__toString()
                                ));
                        }
                } catch (FrameworkException $e) {
                        // Output debug message
-                       self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:] Problem while resolving own IP address: [%s|%s]:%s',
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:] Problem while resolving own IP address: [%s|%s]:%s',
                                $helperInstance->__toString(),
                                $e->__toString(),
                                $e->getHexCode(),
                                $helperInstance->__toString(),
                                $e->__toString(),
                                $e->getHexCode(),
@@ -351,7 +351,7 @@ class ConsoleTools extends BaseFrameworkSystem {
 
 
                // Debug message
 
 
                // Debug message
-               /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONSOLE-TOOLS[' . __METHOD__ . ':' . __LINE__ . ']: Resolved external address: ' . $externalAddress);
+               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONSOLE-TOOLS[' . __METHOD__ . ':' . __LINE__ . ']: Resolved external address: ' . $externalAddress);
 
                // Return determined external address
                return $externalAddress;
 
                // Return determined external address
                return $externalAddress;
index 936874e96f7a1c4302f0ae2a8aaf302bba1c5210..011899661bbcd472ada89bcda6c5e1687e8b4098 100644 (file)
@@ -55,7 +55,7 @@ class SocketContainer extends BaseContainer implements Registerable {
                unset($packageData[NetworkPackage::PACKAGE_DATA_HASH]);
 
                // Debug message
                unset($packageData[NetworkPackage::PACKAGE_DATA_HASH]);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-CONTAINER[' . __METHOD__ . ':' . __LINE__ . ']:socketResource=' . $socketResource . ',packageData='.print_r($packageData, TRUE));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-CONTAINER[' . __METHOD__ . ':' . __LINE__ . ']:socketResource=' . $socketResource . ',packageData='.print_r($packageData, TRUE));
 
                // Is the info instance set?
                if ($infoInstance instanceof ShareableInfo) {
 
                // Is the info instance set?
                if ($infoInstance instanceof ShareableInfo) {
@@ -64,18 +64,18 @@ class SocketContainer extends BaseContainer implements Registerable {
                        $helperInstance = $infoInstance->getHelperInstance();
 
                        // Debug message
                        $helperInstance = $infoInstance->getHelperInstance();
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-CONTAINER[' . __METHOD__ . ':' . __LINE__ . ']: listenerInstance[]=' . gettype($listenerInstance));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-CONTAINER[' . __METHOD__ . ':' . __LINE__ . ']: listenerInstance[]=' . gettype($listenerInstance));
 
                        // Is there a listener instance set?
                        if ($listenerInstance instanceof Listenable) {
                                // Debug message
 
                        // Is there a listener instance set?
                        if ($listenerInstance instanceof Listenable) {
                                // Debug message
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-CONTAINER[' . __METHOD__ . ':' . __LINE__ . ']: Setting listenerInstance=' . $listenerInstance->__toString() . ' ...');
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-CONTAINER[' . __METHOD__ . ':' . __LINE__ . ']: Setting listenerInstance=' . $listenerInstance->__toString() . ' ...');
 
                                // Set it here for later usage
                                $containerInstance->setListenerInstance($listenerInstance);
                        } elseif ($helperInstance instanceof ConnectionHelper) {
                                // Debug message
 
                                // Set it here for later usage
                                $containerInstance->setListenerInstance($listenerInstance);
                        } elseif ($helperInstance instanceof ConnectionHelper) {
                                // Debug message
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-CONTAINER[' . __METHOD__ . ':' . __LINE__ . ']: Setting helperInstance=' . $helperInstance->__toString() . ' ...');
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-CONTAINER[' . __METHOD__ . ':' . __LINE__ . ']: Setting helperInstance=' . $helperInstance->__toString() . ' ...');
 
                                // Set it here for later usage
                                $containerInstance->setHelperInstance($helperInstance);
 
                                // Set it here for later usage
                                $containerInstance->setHelperInstance($helperInstance);
@@ -103,7 +103,7 @@ class SocketContainer extends BaseContainer implements Registerable {
                $packageData = $this->getPackageData();
 
                // Debug message
                $packageData = $this->getPackageData();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-CONTAINER[' . __METHOD__ . ':' . __LINE__ . ']: unl=' . $unl . ',packageData=' . print_r($packageData, TRUE));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-CONTAINER[' . __METHOD__ . ':' . __LINE__ . ']: unl=' . $unl . ',packageData=' . print_r($packageData, TRUE));
 
                // So, does both match?
                $matches = ((isset($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT])) && ($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT] === $unl));
 
                // So, does both match?
                $matches = ((isset($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT])) && ($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT] === $unl));
@@ -120,7 +120,7 @@ class SocketContainer extends BaseContainer implements Registerable {
         */
        public final function ifSocketResourceMatches ($socketResource) {
                // Debug message
         */
        public final function ifSocketResourceMatches ($socketResource) {
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-CONTAINER[' . __METHOD__ . ':' . __LINE__ . ']: socketResource[' . gettype($socketResource) . ']=' .$socketResource . ',storedResource[' . gettype($this->getSocketResource()) . ']=' . $this->getSocketResource());
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-CONTAINER[' . __METHOD__ . ':' . __LINE__ . ']: socketResource[' . gettype($socketResource) . ']=' .$socketResource . ',storedResource[' . gettype($this->getSocketResource()) . ']=' . $this->getSocketResource());
 
                // So, does both match?
                $matches = ((is_resource($socketResource)) && ($socketResource === $this->getSocketResource()));
 
                // So, does both match?
                $matches = ((is_resource($socketResource)) && ($socketResource === $this->getSocketResource()));
index abaace75c9370f83bbc8d6df01f20f5b10dae31b..bc257a7b235669773a81f7a1557c466044ce16d7 100644 (file)
@@ -186,9 +186,9 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
         * @return      void
         */
        protected function initFilterChain ($filterChain) {
         * @return      void
         */
        protected function initFilterChain ($filterChain) {
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONTROLLER: ' . $filterChain . ' init: START');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONTROLLER: ' . $filterChain . ' init: START');
                $this->filterChains[$filterChain] = ObjectFactory::createObjectByConfiguredName('filter_chain_class');
                $this->filterChains[$filterChain] = ObjectFactory::createObjectByConfiguredName('filter_chain_class');
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONTROLLER: ' . $filterChain . ' init: FINISHED');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONTROLLER: ' . $filterChain . ' init: FINISHED');
        }
 
        /**
        }
 
        /**
@@ -200,7 +200,7 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
         * @throws      InvalidFilterChainException     If the filter chain is invalid
         */
        protected function addFilter ($filterChain, Filterable $filterInstance) {
         * @throws      InvalidFilterChainException     If the filter chain is invalid
         */
        protected function addFilter ($filterChain, Filterable $filterInstance) {
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONTROLLER: ' . $filterChain . ',' . $filterInstance->__toString(). ' add: START');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONTROLLER: ' . $filterChain . ',' . $filterInstance->__toString(). ' add: START');
 
                // Test if the filter is there
                if (!isset($this->filterChains[$filterChain])) {
 
                // Test if the filter is there
                if (!isset($this->filterChains[$filterChain])) {
@@ -210,7 +210,7 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
 
                // Add the filter
                $this->filterChains[$filterChain]->addFilter($filterInstance);
 
                // Add the filter
                $this->filterChains[$filterChain]->addFilter($filterInstance);
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONTROLLER: ' . $filterChain . ',' . $filterInstance->__toString(). ' add: FINISH');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONTROLLER: ' . $filterChain . ',' . $filterInstance->__toString(). ' add: FINISH');
        }
 
        /**
        }
 
        /**
index bb556c59fb4535f11f27d6e584b264840ab10a2c..cab71ab0ab47054f288041d34041579c8f72f0f0 100644 (file)
@@ -168,7 +168,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
         */
        public final function addCriteria ($criteriaKey, $criteriaValue, $criteriaType = 'default') {
                // Debug message
         */
        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!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->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)));
 
                // Make sure no 'my-' or 'my_' passes this point
                assert((strpos($criteriaKey, 'my-') === FALSE) && (strpos($criteriaKey, 'my_') === FALSE) && (!is_bool($criteriaValue)));
@@ -177,7 +177,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                $criteriaKey = self::convertDashesToUnderscores($criteriaKey);
 
                // Debug message
                $criteriaKey = self::convertDashesToUnderscores($criteriaKey);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey);
 
                // Append it
                $this->appendStringToGenericArrayElement('criteria', $criteriaType, 'entries', $criteriaKey, $criteriaValue);
 
                // Append it
                $this->appendStringToGenericArrayElement('criteria', $criteriaType, 'entries', $criteriaKey, $criteriaValue);
@@ -194,7 +194,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
         */
        public final function setCriteria ($criteriaKey, $criteriaValue, $criteriaType = 'default') {
                // Debug message
         */
        public final function setCriteria ($criteriaKey, $criteriaValue, $criteriaType = 'default') {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue . ',criteriaType=' . $criteriaType . ' - CALLED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->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)));
 
                // Make sure no 'my-' or 'my_' passes this point
                assert((strpos($criteriaKey, 'my-') === FALSE) && (strpos($criteriaKey, 'my_') === FALSE) && (!is_bool($criteriaValue)));
@@ -203,7 +203,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                $criteriaKey = self::convertDashesToUnderscores($criteriaKey);
 
                // Debug message
                $criteriaKey = self::convertDashesToUnderscores($criteriaKey);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey);
 
                // Set it
                $this->setStringGenericArrayElement('criteria', $criteriaType, 'entries', $criteriaKey, $criteriaValue);
 
                // Set it
                $this->setStringGenericArrayElement('criteria', $criteriaType, 'entries', $criteriaKey, $criteriaValue);
@@ -222,7 +222,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                assert((strpos($criteriaKey, 'my-') === FALSE) && (strpos($criteriaKey, 'my_') === FALSE) && (!is_bool($criteriaValue)));
 
                // Debug message
                assert((strpos($criteriaKey, 'my-') === FALSE) && (strpos($criteriaKey, 'my_') === FALSE) && (!is_bool($criteriaValue)));
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue);
 
                // Add it
                $this->pushValueToGenericArrayElement('criteria', 'choice', 'entries', self::convertDashesToUnderscores($criteriaKey), (string) $criteriaValue);
 
                // Add it
                $this->pushValueToGenericArrayElement('criteria', 'choice', 'entries', self::convertDashesToUnderscores($criteriaKey), (string) $criteriaValue);
@@ -264,7 +264,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
         */
        public function getCriteriaElemnent ($criteriaKey, $criteriaType = 'default') {
                // Debug message
         */
        public function getCriteriaElemnent ($criteriaKey, $criteriaType = 'default') {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteriaType=' . $criteriaType . ' - CALLED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->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));
 
                // Make sure no 'my-' or 'my_' passes this point
                assert((strpos($criteriaKey, 'my-') === FALSE) && (strpos($criteriaKey, 'my_') === FALSE));
@@ -273,7 +273,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                $criteriaKey = self::convertDashesToUnderscores($criteriaKey);
 
                // Debug message
                $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__, __LINE__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteria()=' . $this->countGenericArrayGroup('criteria', $criteriaType));
 
                // Default is not found
                $value = FALSE;
 
                // Default is not found
                $value = FALSE;
@@ -285,7 +285,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                } // END - if
 
                // Debug message
                } // END - if
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: value=' . $value . ' - EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: value=' . $value . ' - EXIT!');
 
                // Return the value
                return $value;
 
                // Return the value
                return $value;
@@ -387,7 +387,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
         */
        public function getCacheKey ($onlyKeys = array(), $criteriaType = 'default') {
                // Debug message
         */
        public function getCacheKey ($onlyKeys = array(), $criteriaType = 'default') {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($this->__toString() . ': criteriaType=' . $criteriaType . ',count()=' . $this->countGenericArray('criteria')));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput($this->__toString() . ': criteriaType=' . $criteriaType . ',count()=' . $this->countGenericArray('criteria')));
 
                // Make sure the criteria is there
                assert($this->isValidGenericArrayGroup('criteria', $criteriaType));
 
                // Make sure the criteria is there
                assert($this->isValidGenericArrayGroup('criteria', $criteriaType));
index 2e69e4c4382b9303b45244b0460c0f539711a677..777a0fae73ac0447c34a7c191fd2c1dcb96c86b0 100644 (file)
@@ -121,7 +121,7 @@ class DataSetCriteria extends BaseCriteria implements StoreableCriteria {
                $primaryKeys = $this->getPrimaryKeys();
 
                // Debug message
                $primaryKeys = $this->getPrimaryKeys();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: tableName=' . $this->getTableName() . ',primaryKey=' . $primaryKey . ',primaryKeys()=' . count($primaryKeys));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: tableName=' . $this->getTableName() . ',primaryKey=' . $primaryKey . ',primaryKeys()=' . count($primaryKeys));
 
                /*
                 * If this is not set, this could mean a badly written frontend as
 
                /*
                 * If this is not set, this could mean a badly written frontend as
@@ -142,7 +142,7 @@ class DataSetCriteria extends BaseCriteria implements StoreableCriteria {
                        } // END - foreach
 
                        // Debug message
                        } // END - foreach
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: tableName=' . $this->getTableName() . ',return=' . $return . ' - EXIT!');
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: tableName=' . $this->getTableName() . ',return=' . $return . ' - EXIT!');
 
                        // Return it
                        return $return;
 
                        // Return it
                        return $return;
@@ -151,13 +151,13 @@ class DataSetCriteria extends BaseCriteria implements StoreableCriteria {
                        return $primaryKey;
                } else {
                        // @TODO Issue a warning
                        return $primaryKey;
                } else {
                        // @TODO Issue a warning
-                       self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: Primary key not set for table ' . $this->getTableName() . ', please fix your table. Falling back to unique key ...');
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: Primary key not set for table ' . $this->getTableName() . ', please fix your table. Falling back to unique key ...');
 
                        // Get unique key
                        $uniqueKey = trim($this->getCriteriaElemnent($this->getUniqueKey()));
 
                        // Debug message
 
                        // Get unique key
                        $uniqueKey = trim($this->getCriteriaElemnent($this->getUniqueKey()));
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: tableName=' . $this->getTableName() . ',uniqueKey=' . $uniqueKey);
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: tableName=' . $this->getTableName() . ',uniqueKey=' . $uniqueKey);
 
                        // Is it empty, too?
                        if (empty($uniqueKey)) {
 
                        // Is it empty, too?
                        if (empty($uniqueKey)) {
index 9a647b283a29e1dc8e38670f2439140de0113765..418c1f4c2b2bf2828280574f00951d13b243b5b7 100644 (file)
@@ -134,19 +134,19 @@ class SearchCriteria extends BaseCriteria implements LocalSearchCriteria {
                $valueArray = explode($separator, $value);
 
                // Debug message
                $valueArray = explode($separator, $value);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: key=' . $key . ',value[' . gettype($value) . ']=' . $value . ' - CALLED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: key=' . $key . ',value[' . gettype($value) . ']=' . $value . ' - CALLED!');
 
                // Get 'default' search value
                $searchDefault = $this->getCriteriaElemnent($key);
 
                // Debug message
 
                // Get 'default' search value
                $searchDefault = $this->getCriteriaElemnent($key);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaElement(' . $key . ')[' . gettype($searchDefault) . ']=' . $searchDefault);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaElement(' . $key . ')[' . gettype($searchDefault) . ']=' . $searchDefault);
 
                // 'default' check
                $isMatching = (((($searchDefault !== FALSE) && ($searchDefault == $value)) || ((is_null($searchDefault)) && (is_null($value)))) || ($searchDefault === FALSE));
 
                // Debug message
 
                // 'default' check
                $isMatching = (((($searchDefault !== FALSE) && ($searchDefault == $value)) || ((is_null($searchDefault)) && (is_null($value)))) || ($searchDefault === FALSE));
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaElement(' . $key . ')[' . gettype($searchDefault) . ']=' . $searchDefault . ',isMatching=' . intval($isMatching));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaElement(' . $key . ')[' . gettype($searchDefault) . ']=' . $searchDefault . ',isMatching=' . intval($isMatching));
 
                // Get 'choice' search value (can be NULL or $separator-separated string)
                $searchChoice = $this->getCriteriaChoiceElemnent($key);
 
                // Get 'choice' search value (can be NULL or $separator-separated string)
                $searchChoice = $this->getCriteriaChoiceElemnent($key);
@@ -155,7 +155,7 @@ class SearchCriteria extends BaseCriteria implements LocalSearchCriteria {
                assert(($searchChoice === FALSE) || (is_array($searchChoice)));
 
                // Debug message
                assert(($searchChoice === FALSE) || (is_array($searchChoice)));
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaChoiceElement(' . $key . ')[' . gettype($searchChoice) . ']=' . print_r($searchChoice, TRUE));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaChoiceElement(' . $key . ')[' . gettype($searchChoice) . ']=' . print_r($searchChoice, TRUE));
 
                // 'choice' check
                if ((is_array($searchChoice)) && (count($valueArray) == 1)) {
 
                // 'choice' check
                if ((is_array($searchChoice)) && (count($valueArray) == 1)) {
@@ -163,41 +163,41 @@ class SearchCriteria extends BaseCriteria implements LocalSearchCriteria {
                        $isMatching = ((($isMatching === TRUE) || (($searchDefault === FALSE) && (!is_null($value)))) && (in_array($value, $searchChoice)));
 
                        // Debug message
                        $isMatching = ((($isMatching === TRUE) || (($searchDefault === FALSE) && (!is_null($value)))) && (in_array($value, $searchChoice)));
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',value[' . gettype($value) . ']=' . $value . ',isMatching=' . intval($isMatching) . ' - SINGLE-MATCH');
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',value[' . gettype($value) . ']=' . $value . ',isMatching=' . intval($isMatching) . ' - SINGLE-MATCH');
                } elseif ((is_array($searchChoice)) && (count($valueArray) > 1)) {
                        // Debug message
                } elseif ((is_array($searchChoice)) && (count($valueArray) > 1)) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',valueArray()=' . count($valueArray) . ',isMatching=' . intval($isMatching));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',valueArray()=' . count($valueArray) . ',isMatching=' . intval($isMatching));
 
                        // $value is choice-search value, so check all entries
                        $isMatching = (($isMatching === TRUE) || (($searchDefault === FALSE) && (!is_null($value))));
                        $idx = 0;
                        foreach ($valueArray as $idx => $match) {
                                // Debug message
 
                        // $value is choice-search value, so check all entries
                        $isMatching = (($isMatching === TRUE) || (($searchDefault === FALSE) && (!is_null($value))));
                        $idx = 0;
                        foreach ($valueArray as $idx => $match) {
                                // Debug message
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: match=' . $match . ',count(searchChoice)=' . count($searchChoice));
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: match=' . $match . ',count(searchChoice)=' . count($searchChoice));
 
                                // Is it found? (one is okay)
                                $isMatching = (($isMatching === TRUE) && (in_array($match, $searchChoice)));
 
                                // Debug message
 
                                // Is it found? (one is okay)
                                $isMatching = (($isMatching === TRUE) && (in_array($match, $searchChoice)));
 
                                // Debug message
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: match=' . $match . ',isMatching=' . intval($isMatching));
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: match=' . $match . ',isMatching=' . intval($isMatching));
                        } // END - foreach
 
                        // Debug message
                        } // END - foreach
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',valueArray()=' . count($valueArray) . ',idx=' . $idx . ',isMatching=' . intval($isMatching) . ' - CHOICE-MATCH');
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',valueArray()=' . count($valueArray) . ',idx=' . $idx . ',isMatching=' . intval($isMatching) . ' - CHOICE-MATCH');
                } else {
                        // Choice-match is FALSE
                        // Debug message
                } else {
                        // Choice-match is FALSE
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',value[' . gettype($value) . ']=' . $value . ',isMatching=' . intval($isMatching) . ' - FALSE-MATCH');
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',value[' . gettype($value) . ']=' . $value . ',isMatching=' . intval($isMatching) . ' - FALSE-MATCH');
                }
 
                // Debug message
                }
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',isMatching=' . intval($isMatching));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',isMatching=' . intval($isMatching));
 
                // Get 'exclude' search value
                $searchExclude = $this->getCriteriaExcludeElemnent($key);
 
                // Debug message
 
                // Get 'exclude' search value
                $searchExclude = $this->getCriteriaExcludeElemnent($key);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaExcludeElement(' . $key . ')[' . gettype($searchExclude) . ']=' . $searchExclude);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaExcludeElement(' . $key . ')[' . gettype($searchExclude) . ']=' . $searchExclude);
 
                // 'exclude' check
                $isMatching = (
 
                // 'exclude' check
                $isMatching = (
@@ -221,7 +221,7 @@ class SearchCriteria extends BaseCriteria implements LocalSearchCriteria {
                );
 
                // Return result
                );
 
                // Return result
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: key=' . $key . ',value[' . gettype($value) . ']=' . $value . ',isMatching=' . intval($isMatching) . ' - EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: key=' . $key . ',value[' . gettype($value) . ']=' . $value . ',isMatching=' . intval($isMatching) . ' - EXIT!');
                return $isMatching;
        }
 
                return $isMatching;
        }
 
index 5c887e5b3172cf43c85835eb0b1f74540e8b370a..a8d0071bdd02824dae4c0a5ef911b4eb2e364425 100644 (file)
@@ -170,7 +170,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
         */
        private function getDataArrayFromFile ($fqfn) {
                // Debug message
         */
        private function getDataArrayFromFile ($fqfn) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: Reading elements from database file ' . $fqfn . ' ...');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: Reading elements from database file ' . $fqfn . ' ...');
 
                // Init compressed data
                $compressedData = $this->getFileIoInstance()->loadFileContents($fqfn);
 
                // Init compressed data
                $compressedData = $this->getFileIoInstance()->loadFileContents($fqfn);
@@ -186,8 +186,8 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                $dataArray = json_decode($serializedData, TRUE);
 
                // Debug message
                $dataArray = json_decode($serializedData, TRUE);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: Read ' . count($dataArray) . ' elements from database file ' . $fqfn . '.');
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: dataArray=' . print_r($dataArray, TRUE));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: Read ' . count($dataArray) . ' elements from database file ' . $fqfn . '.');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: dataArray=' . print_r($dataArray, TRUE));
 
                // Finally return it
                return $dataArray;
 
                // Finally return it
                return $dataArray;
@@ -202,20 +202,20 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
         */
        private function writeDataArrayToFqfn ($fqfn, array $dataArray) {
                // Debug message
         */
        private function writeDataArrayToFqfn ($fqfn, array $dataArray) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: Flushing ' . count($dataArray) . ' elements to database file ' . $fqfn . ' ...');
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: dataArray=' . print_r($dataArray, TRUE));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: Flushing ' . count($dataArray) . ' elements to database file ' . $fqfn . ' ...');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: dataArray=' . print_r($dataArray, TRUE));
 
                // Serialize and compress it
                $compressedData = $this->getCompressorChannel()->getCompressor()->compressStream(json_encode($dataArray));
 
                // Write data
 
                // Serialize and compress it
                $compressedData = $this->getCompressorChannel()->getCompressor()->compressStream(json_encode($dataArray));
 
                // Write data
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: Writing ' . strlen($compressedData) . ' bytes ...');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: Writing ' . strlen($compressedData) . ' bytes ...');
 
                // Write this data BASE64 encoded to the file
                $this->getFileIoInstance()->saveStreamToFile($fqfn, $compressedData, $this);
 
                // Debug message
 
                // Write this data BASE64 encoded to the file
                $this->getFileIoInstance()->saveStreamToFile($fqfn, $compressedData, $this);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: Flushing ' . count($dataArray) . ' elements to database file completed.');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: Flushing ' . count($dataArray) . ' elements to database file completed.');
        }
 
        /**
        }
 
        /**
@@ -313,7 +313,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                $infoArray = $this->getContentsFromTableInfoFile($dataSetInstance);
 
                // Is the primary key there?
                $infoArray = $this->getContentsFromTableInfoFile($dataSetInstance);
 
                // Is the primary key there?
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: tableInfo=' . print_r($this->tableInfo, TRUE));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: tableInfo=' . print_r($this->tableInfo, TRUE));
                if (!isset($this->tableInfo[$tableName]['primary'])) {
                        // Then create the info file
                        $this->createTableInfoFile($dataSetInstance);
                if (!isset($this->tableInfo[$tableName]['primary'])) {
                        // Then create the info file
                        $this->createTableInfoFile($dataSetInstance);
@@ -347,7 +347,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
         */
        public function querySelect ($tableName, LocalSearchCriteria $searchInstance) {
                // Debug message
         */
        public function querySelect ($tableName, LocalSearchCriteria $searchInstance) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: tableName=' . $tableName . ' - CALLED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: tableName=' . $tableName . ' - CALLED!');
 
                // The result is null by any errors
                $resultData = NULL;
 
                // The result is null by any errors
                $resultData = NULL;
@@ -377,7 +377,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                        // Read the directory with some exceptions
                        while (($dataFile = $directoryInstance->readDirectoryExcept(array('.htaccess', 'info.' . $this->getFileExtension()))) && (($limitFound < $searchInstance->getLimit()) || ($searchInstance->getLimit() == 0))) {
                                // Debug message
                        // Read the directory with some exceptions
                        while (($dataFile = $directoryInstance->readDirectoryExcept(array('.htaccess', 'info.' . $this->getFileExtension()))) && (($limitFound < $searchInstance->getLimit()) || ($searchInstance->getLimit() == 0))) {
                                // Debug message
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: dataFile=' . $dataFile . ',this->getFileExtension()=' . $this->getFileExtension());
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: dataFile=' . $dataFile . ',this->getFileExtension()=' . $this->getFileExtension());
 
                                // Does the extension match?
                                if (substr($dataFile, -(strlen($this->getFileExtension()))) !== $this->getFileExtension()) {
 
                                // Does the extension match?
                                if (substr($dataFile, -(strlen($this->getFileExtension()))) !== $this->getFileExtension()) {
@@ -387,7 +387,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
 
                                // Read the file
                                $dataArray = $this->getDataArrayFromFile($pathName . $dataFile);
 
                                // Read the file
                                $dataArray = $this->getDataArrayFromFile($pathName . $dataFile);
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: dataFile=' . $dataFile . ',dataArray='.print_r($dataArray, TRUE));
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: dataFile=' . $dataFile . ',dataArray='.print_r($dataArray, TRUE));
 
                                // Is this an array?
                                if (is_array($dataArray)) {
 
                                // Is this an array?
                                if (is_array($dataArray)) {
@@ -401,11 +401,11 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
 
                                                // Found one entry?
                                                $isFound = (($isFound === TRUE) && ($searchInstance->isCriteriaMatching($key, $value)));
 
                                                // Found one entry?
                                                $isFound = (($isFound === TRUE) && ($searchInstance->isCriteriaMatching($key, $value)));
-                                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: key=' . $key . ',value=' . $value . ',isFound=' . intval($isFound));
+                                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: key=' . $key . ',value=' . $value . ',isFound=' . intval($isFound));
                                        } // END - foreach
 
                                        // Is all found?
                                        } // END - foreach
 
                                        // Is all found?
-                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: isFound=' . intval($isFound) . ',limitFound=' . $limitFound . ',limit=' . $searchInstance->getLimit());
+                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: isFound=' . intval($isFound) . ',limitFound=' . $limitFound . ',limit=' . $searchInstance->getLimit());
                                        if ($isFound === TRUE) {
                                                // Shall we skip this entry?
                                                if ($searchInstance->getSkip() > 0) {
                                        if ($isFound === TRUE) {
                                                // Shall we skip this entry?
                                                if ($searchInstance->getSkip() > 0) {
@@ -421,7 +421,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                                                $dataArray[$this->getIndexKey()] = $idx;
 
                                                // Entry found!
                                                $dataArray[$this->getIndexKey()] = $idx;
 
                                                // Entry found!
-                                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: indexKey=' . $this->getIndexKey() . ',idx=' . $idx . ',dataArray=' . print_r($dataArray, TRUE));
+                                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: indexKey=' . $this->getIndexKey() . ',idx=' . $idx . ',dataArray=' . print_r($dataArray, TRUE));
                                                array_push($resultData[BaseDatabaseBackend::RESULT_INDEX_ROWS], $dataArray);
 
                                                // Count found entries up
                                                array_push($resultData[BaseDatabaseBackend::RESULT_INDEX_ROWS], $dataArray);
 
                                                // Count found entries up
@@ -518,14 +518,14 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                                // Does the extension match?
                                if (substr($dataFile, -(strlen($this->getFileExtension()))) !== $this->getFileExtension()) {
                                        // Debug message
                                // Does the extension match?
                                if (substr($dataFile, -(strlen($this->getFileExtension()))) !== $this->getFileExtension()) {
                                        // Debug message
-                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: dataFile=' . $dataFile . ',getFileExtension()=' . $this->getFileExtension() . ' - SKIPPED!');
+                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: dataFile=' . $dataFile . ',getFileExtension()=' . $this->getFileExtension() . ' - SKIPPED!');
                                        // Skip this file!
                                        continue;
                                } // END - if
 
                                // Open this file for reading
                                $dataArray = $this->getDataArrayFromFile($pathName . $dataFile);
                                        // Skip this file!
                                        continue;
                                } // END - if
 
                                // Open this file for reading
                                $dataArray = $this->getDataArrayFromFile($pathName . $dataFile);
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: dataFile=' . $dataFile . ',dataArray='.print_r($dataArray, TRUE));
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: dataFile=' . $dataFile . ',dataArray='.print_r($dataArray, TRUE));
 
                                // Is this an array?
                                if (is_array($dataArray)) {
 
                                // Is this an array?
                                if (is_array($dataArray)) {
@@ -542,14 +542,14 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                                        } // END - foreach
 
                                        // Is all found?
                                        } // END - foreach
 
                                        // Is all found?
-                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: isFound=' . intval($isFound));
+                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: isFound=' . intval($isFound));
                                        if ($isFound === TRUE) {
                                                // Shall we skip this entry?
                                                if ($searchInstance->getSkip() > 0) {
                                                        // We shall skip some entries
                                                        if ($skipFound < $searchInstance->getSkip()) {
                                                                // Skip this entry
                                        if ($isFound === TRUE) {
                                                // Shall we skip this entry?
                                                if ($searchInstance->getSkip() > 0) {
                                                        // We shall skip some entries
                                                        if ($skipFound < $searchInstance->getSkip()) {
                                                                // Skip this entry
-                                                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: Found entry, but skipping ...');
+                                                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: Found entry, but skipping ...');
                                                                $skipFound++;
                                                                break;
                                                        } // END - if
                                                                $skipFound++;
                                                                break;
                                                        } // END - if
@@ -562,12 +562,12 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                                                        assert($searchKey != $this->indexKey);
 
                                                        // Debug message + add/update it
                                                        assert($searchKey != $this->indexKey);
 
                                                        // Debug message + add/update it
-                                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: criteriaKey=' . $searchKey . ',criteriaValue=' . $searchValue);
+                                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: criteriaKey=' . $searchKey . ',criteriaValue=' . $searchValue);
                                                        $dataArray[$searchKey] = $searchValue;
                                                } // END - foreach
 
                                                // Write the data to a local file
                                                        $dataArray[$searchKey] = $searchValue;
                                                } // END - foreach
 
                                                // Write the data to a local file
-                                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: Writing dataArray()=' . count($dataArray) . ' to ' . $dataFile . ' ...');
+                                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: Writing dataArray()=' . count($dataArray) . ' to ' . $dataFile . ' ...');
                                                $this->writeDataArrayToFqfn($pathName . $dataFile, $dataArray);
 
                                                // Count found entries up
                                                $this->writeDataArrayToFqfn($pathName . $dataFile, $dataArray);
 
                                                // Count found entries up
@@ -626,7 +626,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                unset($data[$this->indexKey]);
 
                // Return it
                unset($data[$this->indexKey]);
 
                // Return it
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: data[' . gettype($data) . ']='.print_r($data, TRUE));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: data[' . gettype($data) . ']='.print_r($data, TRUE));
                return $data;
        }
 
                return $data;
        }
 
@@ -637,7 +637,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
         * @return      $count          Total rows of given table
         */
        public function countTotalRows($tableName) {
         * @return      $count          Total rows of given table
         */
        public function countTotalRows($tableName) {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: tableName=' . $tableName . ' - CALLED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: tableName=' . $tableName . ' - CALLED!');
 
                // Create full path name
                $pathName = $this->getConfigInstance()->getConfigEntry('local_db_path') . $tableName . '/';
 
                // Create full path name
                $pathName = $this->getConfigInstance()->getConfigEntry('local_db_path') . $tableName . '/';
@@ -655,13 +655,13 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                                // Does the extension match?
                                if (substr($dataFile, -(strlen($this->getFileExtension()))) !== $this->getFileExtension()) {
                                        // Debug message
                                // Does the extension match?
                                if (substr($dataFile, -(strlen($this->getFileExtension()))) !== $this->getFileExtension()) {
                                        // Debug message
-                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: dataFile=' . $dataFile . ',getFileExtension()=' . $this->getFileExtension() . ' - SKIPPED!');
+                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: dataFile=' . $dataFile . ',getFileExtension()=' . $this->getFileExtension() . ' - SKIPPED!');
                                        // Skip this file!
                                        continue;
                                } // END - if
 
                                // Count this row up
                                        // Skip this file!
                                        continue;
                                } // END - if
 
                                // Count this row up
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: dataFile=' . $dataFile . ',getFileExtension()=' . $this->getFileExtension() . ' - COUNTED!');
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: dataFile=' . $dataFile . ',getFileExtension()=' . $this->getFileExtension() . ' - COUNTED!');
                                $count++;
                        } // END - while
                } catch (FrameworkException $e) {
                                $count++;
                        } // END - while
                } catch (FrameworkException $e) {
@@ -673,7 +673,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                }
 
                // Return count
                }
 
                // Return count
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: tableName=' . $tableName . ',count=' . $count . ' - EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: tableName=' . $tableName . ',count=' . $count . ' - EXIT!');
                return $count;
        }
 
                return $count;
        }
 
index eade379ba5ddf141759c5e8fa7273bb5fb4844dc..d4d1b1abc1c34f05098ab42434229ef09af25ced 100644 (file)
@@ -99,7 +99,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
                if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === TRUE) {
                        // First get a key suitable for our cache and extend it with this class name
                        $cacheKey = $this->getCacheKeyByCriteria($dataSetInstance, $onlyKeys);
                if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === TRUE) {
                        // First get a key suitable for our cache and extend it with this class name
                        $cacheKey = $this->getCacheKeyByCriteria($dataSetInstance, $onlyKeys);
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-WRAPPER: Using cache key ' . $cacheKey . ' for purging ...');
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-WRAPPER: Using cache key ' . $cacheKey . ' for purging ...');
                } // END - if
 
                // Does this key exists in cache?
                } // END - if
 
                // Does this key exists in cache?
@@ -127,7 +127,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
                if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === TRUE) {
                        // First get a key suitable for our cache and extend it with this class name
                        $cacheKey = $this->getCacheKeyByCriteria($dataSetInstance, $onlyKeys);
                if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === TRUE) {
                        // First get a key suitable for our cache and extend it with this class name
                        $cacheKey = $this->getCacheKeyByCriteria($dataSetInstance, $onlyKeys);
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-WRAPPER: Using cache key ' . $cacheKey . ' for purging ...');
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-WRAPPER: Using cache key ' . $cacheKey . ' for purging ...');
                } // END - if
 
                // Does this key exists in cache?
                } // END - if
 
                // Does this key exists in cache?
@@ -179,17 +179,17 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
                // Does this key exists in cache?
                if (($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === TRUE) && ($this->cacheInstance->offsetExists($cacheKey, BaseDatabaseBackend::RESULT_INDEX_ROWS, 1))) {
                        // Debug message
                // Does this key exists in cache?
                if (($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === TRUE) && ($this->cacheInstance->offsetExists($cacheKey, BaseDatabaseBackend::RESULT_INDEX_ROWS, 1))) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-WRAPPER: Cache used for cacheKey=' . $cacheKey . ':' . print_r($this->cacheInstance->offsetGet($cacheKey), TRUE));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-WRAPPER: Cache used for cacheKey=' . $cacheKey . ':' . print_r($this->cacheInstance->offsetGet($cacheKey), TRUE));
 
                        // Then use this result
                        $result = $this->cacheInstance->offsetGet($cacheKey);
                } else {
                        // Debug message
 
                        // Then use this result
                        $result = $this->cacheInstance->offsetGet($cacheKey);
                } else {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-WRAPPER: Quering database, cacheKey=' . $cacheKey);
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-WRAPPER: Quering database, cacheKey=' . $cacheKey);
 
                        // Now it's time to ask the database layer for this select statement
                        $result = $this->getDatabaseInstance()->doSelectByTableCriteria($this->getTableName(), $criteriaInstance);
 
                        // Now it's time to ask the database layer for this select statement
                        $result = $this->getDatabaseInstance()->doSelectByTableCriteria($this->getTableName(), $criteriaInstance);
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-WRAPPER: result[]=' . gettype($result));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-WRAPPER: result[]=' . gettype($result));
 
                        // Cache the result if not null
                        if (!is_null($result)) {
 
                        // Cache the result if not null
                        if (!is_null($result)) {
@@ -235,7 +235,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
                        $numRows = $resultInstance->getAffectedRows();
 
                        // Debug message
                        $numRows = $resultInstance->getAffectedRows();
 
                        // Debug message
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-WRAPPER: numRows=' . $numRows);
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-WRAPPER: numRows=' . $numRows);
                } // END - if
 
                // Return the result
                } // END - if
 
                // Return the result
@@ -275,10 +275,10 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
         * @return      $data   A cleaned up array with only public data.
         */
        public function removeNonPublicDataFromArray (array $data) {
         * @return      $data   A cleaned up array with only public data.
         */
        public function removeNonPublicDataFromArray (array $data) {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('WRAPPER[' . $this->__toString() . ']: Calling this->getDatabaseInstance()->removeNonPublicDataFromArray(data) ...');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('WRAPPER[' . $this->__toString() . ']: Calling this->getDatabaseInstance()->removeNonPublicDataFromArray(data) ...');
                $data = $this->getDatabaseInstance()->removeNonPublicDataFromArray($data);
 
                $data = $this->getDatabaseInstance()->removeNonPublicDataFromArray($data);
 
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('WRAPPER[' . $this->__toString() . ']: data[]=' . gettype($data));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('WRAPPER[' . $this->__toString() . ']: data[]=' . gettype($data));
                return $data;
        }
 
                return $data;
        }
 
index 4cc7e26cc77af0fbf09a9bf716908b612822d7df..4e2bfc9bbd87f1120501f3cdbb16ae96eec09d91 100644 (file)
@@ -187,7 +187,7 @@ class CachedDatabaseResult extends BaseDatabaseResult implements SearchableResul
                $isValid = FALSE;
 
                // Debug message
                $isValid = FALSE;
 
                // Debug message
-               //*NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] this->currentPos=' . $this->currentPos);
+               //*NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] this->currentPos=' . $this->currentPos);
 
                // Check if all is fine ...
                if (($this->ifStatusIsOkay()) && (isset($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_ROWS][($this->currentPos + 1)])) && (isset($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_ROWS][0]))) {
 
                // Check if all is fine ...
                if (($this->ifStatusIsOkay()) && (isset($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_ROWS][($this->currentPos + 1)])) && (isset($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_ROWS][0]))) {
@@ -216,7 +216,7 @@ class CachedDatabaseResult extends BaseDatabaseResult implements SearchableResul
         */
        public function ifStatusIsOkay () {
                $ifStatusOkay = ((isset($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_STATUS])) && ($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_STATUS] === BaseDatabaseBackend::RESULT_OKAY));
         */
        public function ifStatusIsOkay () {
                $ifStatusOkay = ((isset($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_STATUS])) && ($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_STATUS] === BaseDatabaseBackend::RESULT_OKAY));
-               //*NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] ifStatusOkay=' . intval($ifStatusOkay));
+               //*NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] ifStatusOkay=' . intval($ifStatusOkay));
                return $ifStatusOkay;
        }
 
                return $ifStatusOkay;
        }
 
index 658cdbb485f9d5ee8144dedf2966c7e5a54edfde..b72644ab7865dd50b8d7bf8567c81cd93bd0c6db 100644 (file)
@@ -98,7 +98,7 @@ class FrameworkFeature extends BaseFrameworkSystem {
         */
        public static function isFeatureAvailable ($featureName) {
                // Debug message
         */
        public static function isFeatureAvailable ($featureName) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d]: featureName=%s - CALLED!', __METHOD__, __LINE__, $featureName));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: featureName=%s - CALLED!', __METHOD__, __LINE__, $featureName));
 
                // Is the cache set?
                if (!isset(self::$enabledFeatures[$featureName]['is_available'])) {
 
                // Is the cache set?
                if (!isset(self::$enabledFeatures[$featureName]['is_available'])) {
@@ -109,7 +109,7 @@ class FrameworkFeature extends BaseFrameworkSystem {
                        // Is the feature enabled?
                        if (!self::isFeatureEnabled($featureName)) {
                                // Then it can't be available
                        // Is the feature enabled?
                        if (!self::isFeatureEnabled($featureName)) {
                                // Then it can't be available
-                               self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d]: Feature "%s"is not enabled.', __METHOD__, __LINE__, $featureName));
+                               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: Feature "%s"is not enabled.', __METHOD__, __LINE__, $featureName));
                                return FALSE;
                        } // END - if
 
                                return FALSE;
                        } // END - if
 
@@ -117,7 +117,7 @@ class FrameworkFeature extends BaseFrameworkSystem {
                        $configKey = sprintf('feature_%s_class', $featureName);
 
                        // Debug message
                        $configKey = sprintf('feature_%s_class', $featureName);
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d]: configKey=%s', __METHOD__, __LINE__, $configKey));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: configKey=%s', __METHOD__, __LINE__, $configKey));
 
                        // Now try to get the instance
                        try {
 
                        // Now try to get the instance
                        try {
@@ -128,12 +128,12 @@ class FrameworkFeature extends BaseFrameworkSystem {
                                self::$enabledFeatures[$featureName]['is_available'] = self::$enabledFeatures[$featureName]['instance']->isFeatureAvailable();
                        } catch (NoClassException $e) {
                                // Feature class not found
                                self::$enabledFeatures[$featureName]['is_available'] = self::$enabledFeatures[$featureName]['instance']->isFeatureAvailable();
                        } catch (NoClassException $e) {
                                // Feature class not found
-                               self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d]: Feature "%s"is not available due to missing feature class. Disabling feature ...', __METHOD__, __LINE__, $featureName));
+                               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: Feature "%s"is not available due to missing feature class. Disabling feature ...', __METHOD__, __LINE__, $featureName));
                        }
                } // END - if
 
                // Debug message
                        }
                } // END - if
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d]: featureName=%s,isAvailable=%d - EXIT!', __METHOD__, __LINE__, $featureName, intval(self::$enabledFeatures[$featureName]['is_available'])));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: featureName=%s,isAvailable=%d - EXIT!', __METHOD__, __LINE__, $featureName, intval(self::$enabledFeatures[$featureName]['is_available'])));
 
                // Return "cached" status
                return self::$enabledFeatures[$featureName]['is_available'];
 
                // Return "cached" status
                return self::$enabledFeatures[$featureName]['is_available'];
index f346fb69fe882d37e7fe3a5a04c96ebb26dcfd15..9ce33ec223d3af94213756d44b65442cef8a3e31 100644 (file)
@@ -150,7 +150,7 @@ class BaseBinaryFile extends BaseAbstractFile {
                /* Only for debugging
                if (isset($this->gaps[0])) {
                        // Output first and last gap
                /* Only for debugging
                if (isset($this->gaps[0])) {
                        // Output first and last gap
-                       self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] this->gaps[0]=%s,this->gaps[%s]=%s', __METHOD__, __LINE__, print_r($this->gaps[0], TRUE), (count($this->gaps) - 1), print_r($this->gaps[count($this->gaps) - 1], TRUE)));
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] this->gaps[0]=%s,this->gaps[%s]=%s', __METHOD__, __LINE__, print_r($this->gaps[0], TRUE), (count($this->gaps) - 1), print_r($this->gaps[count($this->gaps) - 1], TRUE)));
                } // END - if
                */
 
                } // END - if
                */
 
@@ -162,7 +162,7 @@ class BaseBinaryFile extends BaseAbstractFile {
                } // END - if
 
                // Debug output
                } // END - if
 
                // Debug output
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] gapsSize=%s,this->headerSize=%s', __METHOD__, __LINE__, $gapsSize, $this->getHeaderSize()));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] gapsSize=%s,this->headerSize=%s', __METHOD__, __LINE__, $gapsSize, $this->getHeaderSize()));
 
                // Total gap size + header size must be same as file size
                $isGapsOnly = (($this->getHeaderSize() + $gapsSize) == $this->getFileSize());
 
                // Total gap size + header size must be same as file size
                $isGapsOnly = (($this->getHeaderSize() + $gapsSize) == $this->getFileSize());
@@ -258,16 +258,16 @@ class BaseBinaryFile extends BaseAbstractFile {
         * @return      void
         */
        public function updateSeekPosition () {
         * @return      void
         */
        public function updateSeekPosition () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
 
                // Get key (= seek position)
                $seekPosition = $this->key();
 
                // Get key (= seek position)
                $seekPosition = $this->key();
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Setting seekPosition=%s', __METHOD__, __LINE__, $seekPosition));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Setting seekPosition=%s', __METHOD__, __LINE__, $seekPosition));
 
                // And set it here
                $this->setSeekPosition($seekPosition);
 
 
                // And set it here
                $this->setSeekPosition($seekPosition);
 
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
        }
 
        /**
        }
 
        /**
@@ -277,7 +277,7 @@ class BaseBinaryFile extends BaseAbstractFile {
         * @return      void
         */
        protected function rewindUpdateSeekPosition () {
         * @return      void
         */
        protected function rewindUpdateSeekPosition () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
 
                // flushFileHeader must be callable
                assert(is_callable(array($this, 'flushFileHeader')));
 
                // flushFileHeader must be callable
                assert(is_callable(array($this, 'flushFileHeader')));
@@ -291,7 +291,7 @@ class BaseBinaryFile extends BaseAbstractFile {
                // ... to write it back into the file
                $this->flushFileHeader();
 
                // ... to write it back into the file
                $this->flushFileHeader();
 
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
        }
 
        /**
        }
 
        /**
@@ -300,12 +300,12 @@ class BaseBinaryFile extends BaseAbstractFile {
         * @return      void
         */
        protected function seekToOldPosition () {
         * @return      void
         */
        protected function seekToOldPosition () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
 
                // Seek to currently ("old") saved position
                $this->seek($this->getSeekPosition());
 
 
                // Seek to currently ("old") saved position
                $this->seek($this->getSeekPosition());
 
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
        }
 
        /**
        }
 
        /**
@@ -402,7 +402,7 @@ class BaseBinaryFile extends BaseAbstractFile {
         * @return      void
         */
        public function writeData ($seekPosition, $data, $flushHeader = TRUE) {
         * @return      void
         */
        public function writeData ($seekPosition, $data, $flushHeader = TRUE) {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] seekPosition=%s,data()=%d - CALLED!', __METHOD__, __LINE__, $seekPosition, strlen($data)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] seekPosition=%s,data()=%d - CALLED!', __METHOD__, __LINE__, $seekPosition, strlen($data)));
 
                // Write data at given position
                $this->getPointerInstance()->writeAtPosition($seekPosition, $data);
 
                // Write data at given position
                $this->getPointerInstance()->writeAtPosition($seekPosition, $data);
@@ -422,7 +422,7 @@ class BaseBinaryFile extends BaseAbstractFile {
                        $this->seekToOldPosition();
                } // END - if
 
                        $this->seekToOldPosition();
                } // END - if
 
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
        }
 
        /**
        }
 
        /**
@@ -448,7 +448,7 @@ class BaseBinaryFile extends BaseAbstractFile {
         * @return      $isInitialized  Whether the file header is initialized
         */
        public function isFileHeaderInitialized () {
         * @return      $isInitialized  Whether the file header is initialized
         */
        public function isFileHeaderInitialized () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
 
                // Default is not initialized
                $isInitialized = FALSE;
 
                // Default is not initialized
                $isInitialized = FALSE;
@@ -457,12 +457,12 @@ class BaseBinaryFile extends BaseAbstractFile {
                if ($this->isFileInitialized()) {
                        // Some bytes has been written, so rewind to start of it.
                        $rewindStatus = $this->rewind();
                if ($this->isFileInitialized()) {
                        // Some bytes has been written, so rewind to start of it.
                        $rewindStatus = $this->rewind();
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] rewindStatus=%s', __METHOD__, __LINE__, $rewindStatus));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] rewindStatus=%s', __METHOD__, __LINE__, $rewindStatus));
 
                        // Is the rewind() call successfull?
                        if ($rewindStatus != 1) {
                                // Something bad happened
 
                        // Is the rewind() call successfull?
                        if ($rewindStatus != 1) {
                                // Something bad happened
-                               self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Could not rewind().', __METHOD__, __LINE__));
+                               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Could not rewind().', __METHOD__, __LINE__));
                        } // END - if
 
                        // Read file header
                        } // END - if
 
                        // Read file header
@@ -473,7 +473,7 @@ class BaseBinaryFile extends BaseAbstractFile {
                } // END - if
 
                // Return result
                } // END - if
 
                // Return result
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] isInitialized=%d - EXIT!', __METHOD__, __LINE__, intval($isInitialized)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] isInitialized=%d - EXIT!', __METHOD__, __LINE__, intval($isInitialized)));
                return $isInitialized;
        }
 
                return $isInitialized;
        }
 
@@ -483,11 +483,11 @@ class BaseBinaryFile extends BaseAbstractFile {
         * @return      $isInitialized          Whether the file's size is zero
         */
        public function isFileInitialized () {
         * @return      $isInitialized          Whether the file's size is zero
         */
        public function isFileInitialized () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
 
                // Get it from iterator which holds the pointer instance. If FALSE is returned
                $fileSize = $this->size();
 
                // Get it from iterator which holds the pointer instance. If FALSE is returned
                $fileSize = $this->size();
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] fileSize=%s', __METHOD__, __LINE__, $fileSize));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] fileSize=%s', __METHOD__, __LINE__, $fileSize));
 
                /*
                 * The returned file size should not be FALSE or NULL as this means
 
                /*
                 * The returned file size should not be FALSE or NULL as this means
@@ -499,7 +499,7 @@ class BaseBinaryFile extends BaseAbstractFile {
                $isInitialized = ($fileSize > 0);
 
                // Return result
                $isInitialized = ($fileSize > 0);
 
                // Return result
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] isInitialized=%d - EXIT!', __METHOD__, __LINE__, intval($isInitialized)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] isInitialized=%d - EXIT!', __METHOD__, __LINE__, intval($isInitialized)));
                return $isInitialized;
        }
 
                return $isInitialized;
        }
 
@@ -509,7 +509,7 @@ class BaseBinaryFile extends BaseAbstractFile {
         * @return      void
         */
        public function createFileHeader () {
         * @return      void
         */
        public function createFileHeader () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
 
                // The file's header should not be initialized here
                assert(!$this->isFileHeaderInitialized());
 
                // The file's header should not be initialized here
                assert(!$this->isFileHeaderInitialized());
@@ -520,7 +520,7 @@ class BaseBinaryFile extends BaseAbstractFile {
                // Rewind seek position (to beginning of file) and update/flush file header
                $this->rewindUpdateSeekPosition();
 
                // Rewind seek position (to beginning of file) and update/flush file header
                $this->rewindUpdateSeekPosition();
 
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
        }
 
        /**
        }
 
        /**
@@ -530,27 +530,27 @@ class BaseBinaryFile extends BaseAbstractFile {
         * @return      void
         */
        public function preAllocateFile ($type) {
         * @return      void
         */
        public function preAllocateFile ($type) {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
 
                // Is it enabled?
                if ($this->getConfigInstance()->getConfigEntry($type . '_pre_allocate_enabled') != 'Y') {
                        // Not enabled
 
                // Is it enabled?
                if ($this->getConfigInstance()->getConfigEntry($type . '_pre_allocate_enabled') != 'Y') {
                        // Not enabled
-                       self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Not pre-allocating file.', __METHOD__, __LINE__));
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Not pre-allocating file.', __METHOD__, __LINE__));
 
                        // Don't continue here.
                        return;
                } // END - if
 
                // Message to user
 
                        // Don't continue here.
                        return;
                } // END - if
 
                // Message to user
-               self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Pre-allocating file ...', __METHOD__, __LINE__));
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Pre-allocating file ...', __METHOD__, __LINE__));
 
                // Calculate minimum length for one entry
                $minLengthEntry = $this->getBlockInstance()->calculateMinimumBlockLength();
 
                // Calculate minimum length for one entry
                $minLengthEntry = $this->getBlockInstance()->calculateMinimumBlockLength();
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] minLengthEntry=%s', __METHOD__, __LINE__, $minLengthEntry));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] minLengthEntry=%s', __METHOD__, __LINE__, $minLengthEntry));
 
                // Calulcate seek position
                $seekPosition = $minLengthEntry * $this->getConfigInstance()->getConfigEntry($type . '_pre_allocate_count');
 
                // Calulcate seek position
                $seekPosition = $minLengthEntry * $this->getConfigInstance()->getConfigEntry($type . '_pre_allocate_count');
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] seekPosition=%s', __METHOD__, __LINE__, $seekPosition));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] seekPosition=%s', __METHOD__, __LINE__, $seekPosition));
 
                // Now simply write a NUL there. This will pre-allocate the file.
                $this->writeData($seekPosition, chr(0));
 
                // Now simply write a NUL there. This will pre-allocate the file.
                $this->writeData($seekPosition, chr(0));
@@ -558,7 +558,7 @@ class BaseBinaryFile extends BaseAbstractFile {
                // Rewind seek position (to beginning of file) and update/flush file header
                $this->rewindUpdateSeekPosition();
 
                // Rewind seek position (to beginning of file) and update/flush file header
                $this->rewindUpdateSeekPosition();
 
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
        }
 
        /**
        }
 
        /**
@@ -615,7 +615,7 @@ class BaseBinaryFile extends BaseAbstractFile {
         * @return      void
         */
        public function analyzeFile () {
         * @return      void
         */
        public function analyzeFile () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
 
                // Make sure the file is initialized
                assert($this->isFileInitialized());
 
                // Make sure the file is initialized
                assert($this->isFileInitialized());
@@ -624,7 +624,7 @@ class BaseBinaryFile extends BaseAbstractFile {
                $this->initCountersGapsArray();
 
                // Output message (as this may take some time)
                $this->initCountersGapsArray();
 
                // Output message (as this may take some time)
-               self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Analyzing file structure ... (this may take some time)', __METHOD__, __LINE__));
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Analyzing file structure ... (this may take some time)', __METHOD__, __LINE__));
 
                // First rewind to the begining
                $this->rewind();
 
                // First rewind to the begining
                $this->rewind();
@@ -647,13 +647,13 @@ class BaseBinaryFile extends BaseAbstractFile {
                        } // END - if
 
                        // Debug message
                        } // END - if
 
                        // Debug message
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] current()=%d', __METHOD__, __LINE__, strlen($current)));
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] current()=%d', __METHOD__, __LINE__, strlen($current)));
                } // END - while
 
                // If the last read block is empty, check gaps
                if (empty($current)) {
                        // Output message
                } // END - while
 
                // If the last read block is empty, check gaps
                if (empty($current)) {
                        // Output message
-                       self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Found a total of %s gaps.', __METHOD__, __LINE__, count($this->gaps)));
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Found a total of %s gaps.', __METHOD__, __LINE__, count($this->gaps)));
 
                        // Check gaps, if the whole file is empty.
                        if ($this->isFileOnlyGaps()) {
 
                        // Check gaps, if the whole file is empty.
                        if ($this->isFileOnlyGaps()) {
@@ -672,7 +672,7 @@ class BaseBinaryFile extends BaseAbstractFile {
                                $this->doRunDefragmentation();
                        } // END - if
                } // END - if
                                $this->doRunDefragmentation();
                        } // END - if
                } // END - if
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
        }
 
        /**
        }
 
        /**
@@ -688,14 +688,14 @@ class BaseBinaryFile extends BaseAbstractFile {
                } // END - if
 
                // Debug message
                } // END - if
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d] key()=%d', __FUNCTION__, __LINE__, $this->key()));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d] key()=%d', __FUNCTION__, __LINE__, $this->key()));
 
                // Make sure the block instance is set
                assert($this->getBlockInstance() instanceof CalculatableBlock);
 
                // First calculate minimum block length
                $length = $this->getBlockInstance()->calculateMinimumBlockLength();
 
                // Make sure the block instance is set
                assert($this->getBlockInstance() instanceof CalculatableBlock);
 
                // First calculate minimum block length
                $length = $this->getBlockInstance()->calculateMinimumBlockLength();
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d] length=%s', __FUNCTION__, __LINE__, $length));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d] length=%s', __FUNCTION__, __LINE__, $length));
 
                // Short be more than zero!
                assert($length > 0);
 
                // Short be more than zero!
                assert($length > 0);
@@ -713,7 +713,7 @@ class BaseBinaryFile extends BaseAbstractFile {
                        $block = $this->read($length);
 
                        // Debug message
                        $block = $this->read($length);
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d] block()=%d,length=%s', __FUNCTION__, __LINE__, strlen($block), $length));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d] block()=%d,length=%s', __FUNCTION__, __LINE__, strlen($block), $length));
 
                        // Is it all empty?
                        if (strlen(trim($block)) == 0) {
 
                        // Is it all empty?
                        if (strlen(trim($block)) == 0) {
@@ -728,17 +728,17 @@ class BaseBinaryFile extends BaseAbstractFile {
                        $data .= $block;
 
                        // A debug message
                        $data .= $block;
 
                        // A debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d] data()=%d', __FUNCTION__, __LINE__, strlen($data)));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d] data()=%d', __FUNCTION__, __LINE__, strlen($data)));
                } // END - while
 
                // EOF reached?
                if ($this->isEndOfFileReached()) {
                        // Set whole data as current read block
                } // END - while
 
                // EOF reached?
                if ($this->isEndOfFileReached()) {
                        // Set whole data as current read block
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('Calling setCurrentBlock(' . strlen($data) . ') ...');
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Calling setCurrentBlock(' . strlen($data) . ') ...');
                        $this->setCurrentBlock($data);
 
                        // Then abort here silently
                        $this->setCurrentBlock($data);
 
                        // Then abort here silently
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('EOF reached.');
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('EOF reached.');
                        return;
                } // END - if
 
                        return;
                } // END - if
 
@@ -752,7 +752,7 @@ class BaseBinaryFile extends BaseAbstractFile {
                $dataArray = explode(chr(self::SEPARATOR_ENTRIES), $data);
 
                // This array must contain two elements
                $dataArray = explode(chr(self::SEPARATOR_ENTRIES), $data);
 
                // This array must contain two elements
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('dataArray=' . print_r($dataArray, TRUE));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('dataArray=' . print_r($dataArray, TRUE));
                assert(count($dataArray) == 2);
 
                // Left part is the actual block, right one the back-buffer data
                assert(count($dataArray) == 2);
 
                // Left part is the actual block, right one the back-buffer data
index 40d8f8e10ffed5b86ba1d1f83f3d771356540dc5..f733589640b774f6c0f0b022365d3dff5ac66589 100644 (file)
@@ -65,7 +65,7 @@ class IndexFile extends BaseBinaryFile implements Block {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function writeValueToFile ($groupId, $value) {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function writeValueToFile ($groupId, $value) {
-               self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] groupId=' . $groupId . ',value[' . gettype($value) . ']=' . print_r($value, TRUE));
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] groupId=' . $groupId . ',value[' . gettype($value) . ']=' . print_r($value, TRUE));
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
@@ -79,7 +79,7 @@ class IndexFile extends BaseBinaryFile implements Block {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function writeDataToFreeGap ($groupId, $hash, $encoded) {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function writeDataToFreeGap ($groupId, $hash, $encoded) {
-               self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] groupId=' . $groupId . ',encoded()=' . strlen($encoded));
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] groupId=' . $groupId . ',encoded()=' . strlen($encoded));
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
index 270c6f85bde8823cf574854541296152bd4c9406..87b3c0b864960a606a4adeb1ab9ffe5ef4c8c5d1 100644 (file)
@@ -91,7 +91,7 @@ class StackFile extends BaseBinaryFile implements Block {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function writeDataToFreeGap ($groupId, $hash, $encoded) {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function writeDataToFreeGap ($groupId, $hash, $encoded) {
-               self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] groupId=' . $groupId . ',hash=' . $hash . ',encoded()=' . strlen($encoded));
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] groupId=' . $groupId . ',hash=' . $hash . ',encoded()=' . strlen($encoded));
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
index 66cb0193b00afafbaebb87fc10e9e2e1fe6319d3..a4f718dccf51b29039c86e3b86d10b2a8957b305 100644 (file)
@@ -141,7 +141,7 @@ class BaseAbstractFile extends BaseFrameworkSystem implements FilePointer, Close
         */
        public function closeFile () {
                // Debug message
         */
        public function closeFile () {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d]: fileName=%s - CALLED!', __METHOD__, __LINE__, $this->getFileName()));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: fileName=%s - CALLED!', __METHOD__, __LINE__, $this->getFileName()));
 
                // Close down pointer instance as well by unsetting it
                $this->unsetPointerInstance();
 
                // Close down pointer instance as well by unsetting it
                $this->unsetPointerInstance();
@@ -150,7 +150,7 @@ class BaseAbstractFile extends BaseFrameworkSystem implements FilePointer, Close
                $this->setFileName('');
 
                // Debug message
                $this->setFileName('');
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d]: EXIT!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: EXIT!', __METHOD__, __LINE__));
        }
 
        /**
        }
 
        /**
index cdd1b592bf95f36f938e6990296d8368e511f315..829557eadb8866c1bbec63d7a25c068c46197da7 100644 (file)
@@ -76,7 +76,7 @@ class BaseFileIo extends BaseFrameworkSystem implements FilePointer, CloseableFi
         */
        public function closeFile () {
                // Debug message
         */
        public function closeFile () {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d]: fileName=%s - CALLED!', __METHOD__, __LINE__, $this->getFileName()));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: fileName=%s - CALLED!', __METHOD__, __LINE__, $this->getFileName()));
 
                if (is_null($this->getPointer())) {
                        // Pointer not initialized
 
                if (is_null($this->getPointer())) {
                        // Pointer not initialized
@@ -87,7 +87,7 @@ class BaseFileIo extends BaseFrameworkSystem implements FilePointer, CloseableFi
                }
 
                // Debug message
                }
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d]: Closing file %s ...', __METHOD__, __LINE__, $this->getFileName()));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: Closing file %s ...', __METHOD__, __LINE__, $this->getFileName()));
 
                // Close the file pointer and reset the instance variable
                @fclose($this->getPointer());
 
                // Close the file pointer and reset the instance variable
                @fclose($this->getPointer());
@@ -95,7 +95,7 @@ class BaseFileIo extends BaseFrameworkSystem implements FilePointer, CloseableFi
                $this->setFileName('');
 
                // Debug message
                $this->setFileName('');
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d]: EXIT!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: EXIT!', __METHOD__, __LINE__));
        }
 
        /**
        }
 
        /**
@@ -167,7 +167,7 @@ class BaseFileIo extends BaseFrameworkSystem implements FilePointer, CloseableFi
                $status = fseek($this->getPointer(), $offset, $whence);
 
                // Return status
                $status = fseek($this->getPointer(), $offset, $whence);
 
                // Return status
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] status=%d', __METHOD__, __LINE__, $status));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] status=%d', __METHOD__, __LINE__, $status));
                return $status;
        }
 
                return $status;
        }
 
@@ -178,14 +178,14 @@ class BaseFileIo extends BaseFrameworkSystem implements FilePointer, CloseableFi
         * @todo        Handle seekStatus
         */
        public function size () {
         * @todo        Handle seekStatus
         */
        public function size () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
 
                // Get current seek position
                $seekPosition = $this->determineSeekPosition();
 
                // Seek to end
                $seekStatus = $this->seek(0, SEEK_END);
 
                // Get current seek position
                $seekPosition = $this->determineSeekPosition();
 
                // Seek to end
                $seekStatus = $this->seek(0, SEEK_END);
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] seekStatus=%d', __METHOD__, __LINE__, $seekStatus));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] seekStatus=%d', __METHOD__, __LINE__, $seekStatus));
 
                // Get position again  (which is the end of the file)
                $size = $this->determineSeekPosition();
 
                // Get position again  (which is the end of the file)
                $size = $this->determineSeekPosition();
@@ -194,7 +194,7 @@ class BaseFileIo extends BaseFrameworkSystem implements FilePointer, CloseableFi
                $this->seek($seekPosition);
 
                // Return size
                $this->seek($seekPosition);
 
                // Return size
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] size=%s - EXIT!', __METHOD__, __LINE__, $size));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] size=%s - EXIT!', __METHOD__, __LINE__, $size));
                return $size;
        }
 
                return $size;
        }
 
index 6f56e9679e981590333140fdb0a4cf7add8b0541..b1e85730c79dedb7a34ecf7a79898568e1b58864 100644 (file)
@@ -119,7 +119,7 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework
                $pointerInstance->setPathName($pathName);
 
                // Return the instance
                $pointerInstance->setPathName($pathName);
 
                // Return the instance
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: Opened pathName=' . $pathName . ' - EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: Opened pathName=' . $pathName . ' - EXIT!');
                return $pointerInstance;
        }
 
                return $pointerInstance;
        }
 
@@ -129,7 +129,7 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework
         * @return      $currentEntry   Current entry from encapsulated iterator
         */
        public function readRawDirectory () {
         * @return      $currentEntry   Current entry from encapsulated iterator
         */
        public function readRawDirectory () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . '] - CALLED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . '] - CALLED!');
 
                // Can the next entry be read?
                assert($this->getDirectoryIteratorInstance()->valid());
 
                // Can the next entry be read?
                assert($this->getDirectoryIteratorInstance()->valid());
@@ -138,7 +138,7 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework
                $currentEntry = $this->getDirectoryIteratorInstance()->current();
 
                // Return found entry
                $currentEntry = $this->getDirectoryIteratorInstance()->current();
 
                // Return found entry
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: currentEntry[]=' . gettype($currentEntry) . ' - EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: currentEntry[]=' . gettype($currentEntry) . ' - EXIT!');
                return $currentEntry;
        }
 
                return $currentEntry;
        }
 
@@ -152,11 +152,11 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework
                // No exceptions given?
                if (count($except) == 0) {
                        // No exception given, so read all files and directories, but not recursive
                // No exceptions given?
                if (count($except) == 0) {
                        // No exception given, so read all files and directories, but not recursive
-                       self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: No exceptions given, please use readRawDirectory() instead!');
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: No exceptions given, please use readRawDirectory() instead!');
                        return $this->readRawDirectory();
                } elseif (!$this->getDirectoryIteratorInstance()->valid()) {
                        // No more left to read
                        return $this->readRawDirectory();
                } elseif (!$this->getDirectoryIteratorInstance()->valid()) {
                        // No more left to read
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: EOD reached.');
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: EOD reached.');
                        return NULL;
                }
 
                        return NULL;
                }
 
@@ -165,13 +165,13 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework
 
                // Read a raw line...
                $currentEntry = $this->readRawDirectory();
 
                // Read a raw line...
                $currentEntry = $this->readRawDirectory();
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: currentEntry[]=' . gettype($currentEntry));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: currentEntry[]=' . gettype($currentEntry));
 
                // Shall we exclude directories?
                if (is_object($currentEntry)) {
                        // Get file name
                        $rawLine = $currentEntry->getFilename();
 
                // Shall we exclude directories?
                if (is_object($currentEntry)) {
                        // Get file name
                        $rawLine = $currentEntry->getFilename();
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: rawLine[' . gettype($rawLine) . ']=' . $rawLine . ',isDot=' . intval($this->getDirectoryIteratorInstance()->isDot()));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: rawLine[' . gettype($rawLine) . ']=' . $rawLine . ',isDot=' . intval($this->getDirectoryIteratorInstance()->isDot()));
 
                        // Is it a dot-directory or excluded?
                        if (($this->getDirectoryIteratorInstance()->isDot()) || (in_array($rawLine, $except))) {
 
                        // Is it a dot-directory or excluded?
                        if (($this->getDirectoryIteratorInstance()->isDot()) || (in_array($rawLine, $except))) {
@@ -180,7 +180,7 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework
 
                                // Exclude this part
                                $rawLine = $this->readDirectoryExcept($except);
 
                                // Exclude this part
                                $rawLine = $this->readDirectoryExcept($except);
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: rawline[' . gettype($rawLine) . ']=' . $rawLine . ' - Recursive call!');
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: rawline[' . gettype($rawLine) . ']=' . $rawLine . ' - Recursive call!');
                        } // END - if
                } // END - if
 
                        } // END - if
                } // END - if
 
@@ -188,7 +188,7 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework
                $this->getDirectoryIteratorInstance()->next();
 
                // Return read line
                $this->getDirectoryIteratorInstance()->next();
 
                // Return read line
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: rawLine[' . gettype($rawLine) . ']=' . $rawLine);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: rawLine[' . gettype($rawLine) . ']=' . $rawLine);
                return $rawLine;
        }
 
                return $rawLine;
        }
 
index 028009fbceceaf39285abd957fd9908630ae80d0..88fef80b5d74190c5876d4a793697429db4d2dc1 100644 (file)
@@ -260,7 +260,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function streamData ($data) {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function streamData ($data) {
-               self::createDebugInstance(__CLASS__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
index b69e6aeef8088831b5d53e17785d68423d2f71d2..01f78eda9618cf3d3b434cf7de21e40c14f5cc53 100644 (file)
@@ -55,7 +55,7 @@ class BaseTextFile extends BaseAbstractFile {
         */
        public function seek ($offset, $whence = SEEK_SET) {
                // Not possible in text files
         */
        public function seek ($offset, $whence = SEEK_SET) {
                // Not possible in text files
-               self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] offset=' . $offset . ',whence=' . $whence);
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] offset=' . $offset . ',whence=' . $whence);
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
@@ -72,7 +72,7 @@ class BaseTextFile extends BaseAbstractFile {
                 * This class (or its implementations) are special file readers/writers.
                 * There is no need to read/write the whole file.
                 */
                 * This class (or its implementations) are special file readers/writers.
                 * There is no need to read/write the whole file.
                 */
-               self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] fqfn=' . $fqfn);
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] fqfn=' . $fqfn);
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
index 0d1170b14204e1110e8fdb93f8e3d0c6f266d360..e004980beed146284a8875d8ebe0fd9873801966 100644 (file)
@@ -62,19 +62,19 @@ class CsvInputFile extends BaseInputTextFile implements CsvInputStreamer {
         */
        public function readCsvFileLine ($columnSeparator) {
                // Debug message
         */
        public function readCsvFileLine ($columnSeparator) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] columnSeparator=%s - CALLED!', __METHOD__, __LINE__, $columnSeparator));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] columnSeparator=%s - CALLED!', __METHOD__, __LINE__, $columnSeparator));
 
                // Read raw line
                $data = $this->getPointerInstance()->readLine();
 
                // Debug message
 
                // Read raw line
                $data = $this->getPointerInstance()->readLine();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] data()=%d', __METHOD__, __LINE__, strlen($data)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] data()=%d', __METHOD__, __LINE__, strlen($data)));
 
                // Parse data
                $lineArray = $this->parseDataToIndexedArray($data, $columnSeparator);
 
                // Debug message
 
                // Parse data
                $lineArray = $this->parseDataToIndexedArray($data, $columnSeparator);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] lineArray()=%d - EXIT!', __METHOD__, __LINE__, count($lineArray)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] lineArray()=%d - EXIT!', __METHOD__, __LINE__, count($lineArray)));
 
                // Return it
                return $lineArray;
 
                // Return it
                return $lineArray;
@@ -89,7 +89,7 @@ class CsvInputFile extends BaseInputTextFile implements CsvInputStreamer {
         */
        private function parseDataToIndexedArray ($data, $columnSeparator) {
                // Debug message
         */
        private function parseDataToIndexedArray ($data, $columnSeparator) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] data()=%d,columnSeparator=%s - CALLED!', __METHOD__, __LINE__, strlen($data), $columnSeparator));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] data()=%d,columnSeparator=%s - CALLED!', __METHOD__, __LINE__, strlen($data), $columnSeparator));
 
                // Init return array
                $lineArray = array();
 
                // Init return array
                $lineArray = array();
@@ -106,18 +106,18 @@ class CsvInputFile extends BaseInputTextFile implements CsvInputStreamer {
                        $char = substr($data, $idx, 1);
 
                        // Debug message
                        $char = substr($data, $idx, 1);
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] idx=%s,char=%s ...', __METHOD__, __LINE__, $idx, $char));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] idx=%s,char=%s ...', __METHOD__, __LINE__, $idx, $char));
 
                        // Is the column separator found and not within quotes?
                        if (($isInQuotes === FALSE) && ($char == $columnSeparator)) {
                                // Debug message
 
                        // Is the column separator found and not within quotes?
                        if (($isInQuotes === FALSE) && ($char == $columnSeparator)) {
                                // Debug message
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Adding column=%s ...', __METHOD__, __LINE__, $column));
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Adding column=%s ...', __METHOD__, __LINE__, $column));
 
                                // Add this line to the array
                                array_push($lineArray, $column);
 
                                // Debug message
 
                                // Add this line to the array
                                array_push($lineArray, $column);
 
                                // Debug message
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] lineArray()=%d - After add!', __METHOD__, __LINE__, count($lineArray)));
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] lineArray()=%d - After add!', __METHOD__, __LINE__, count($lineArray)));
 
                                // Clear variable ...
                                $column = '';
 
                                // Clear variable ...
                                $column = '';
@@ -126,7 +126,7 @@ class CsvInputFile extends BaseInputTextFile implements CsvInputStreamer {
                                continue;
                        } elseif ($char == chr(34)) {
                                // Debug message
                                continue;
                        } elseif ($char == chr(34)) {
                                // Debug message
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] column=%s ...', __METHOD__, __LINE__, $column));
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] column=%s ...', __METHOD__, __LINE__, $column));
 
                                // $column must be empty at this point if we are at starting quote
                                assert(($isInQuotes === TRUE) || (empty($column)));
 
                                // $column must be empty at this point if we are at starting quote
                                assert(($isInQuotes === TRUE) || (empty($column)));
@@ -135,14 +135,14 @@ class CsvInputFile extends BaseInputTextFile implements CsvInputStreamer {
                                $isInQuotes = (!$isInQuotes);
 
                                // Debug message
                                $isInQuotes = (!$isInQuotes);
 
                                // Debug message
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] isInQuotes=%d ...', __METHOD__, __LINE__, intval($isInQuotes)));
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] isInQuotes=%d ...', __METHOD__, __LINE__, intval($isInQuotes)));
 
                                // Skip double-quote (escaping of them is not yet supported)
                                continue;
                        }
 
                        // Debug message
 
                                // Skip double-quote (escaping of them is not yet supported)
                                continue;
                        }
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Adding char=%s ...', __METHOD__, __LINE__, $idx, $char));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Adding char=%s ...', __METHOD__, __LINE__, $idx, $char));
 
                        // Add char to column
                        $column .= $char;
 
                        // Add char to column
                        $column .= $char;
@@ -151,17 +151,17 @@ class CsvInputFile extends BaseInputTextFile implements CsvInputStreamer {
                // Is there something outstanding?
                if (!empty($column)) {
                        // Debug message
                // Is there something outstanding?
                if (!empty($column)) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Adding column=%s ...', __METHOD__, __LINE__, $column));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Adding column=%s ...', __METHOD__, __LINE__, $column));
 
                        // Then don't forget this. :-)
                        array_push($lineArray, $column);
 
                        // Debug message
 
                        // Then don't forget this. :-)
                        array_push($lineArray, $column);
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] lineArray()=%d - After add!', __METHOD__, __LINE__, count($lineArray)));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] lineArray()=%d - After add!', __METHOD__, __LINE__, count($lineArray)));
                } // END - if
 
                // Debug message
                } // END - if
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] lineArray()=%d - EXIT!', __METHOD__, __LINE__, count($lineArray)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] lineArray()=%d - EXIT!', __METHOD__, __LINE__, count($lineArray)));
 
                // Return it
                return $lineArray;
 
                // Return it
                return $lineArray;
index 2ff8ad3cc2ea3eaaaa420326f84756417ee1a4bd..de1e0da04b5b473bf3b7b620e782d40fed28dfc0 100644 (file)
@@ -120,19 +120,19 @@ class FilterChain extends BaseFrameworkSystem implements Registerable {
         */
        public function processFilters (Requestable $requestInstance, Responseable $responseInstance) {
                // Run all filters
         */
        public function processFilters (Requestable $requestInstance, Responseable $responseInstance) {
                // Run all filters
-               //* DEBUG */ self::createDebugInstance(__CLASS__)->debugOutput('COUNT=' . $this->countGenericArray('filters'));
+               //* DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('COUNT=' . $this->countGenericArray('filters'));
                foreach ($this->getFilters() as $filterInstance) {
                        // Must be an instance of Filterable
                        assert($filterInstance instanceof Filterable);
 
                        // Try to execute this filter
                        try {
                foreach ($this->getFilters() as $filterInstance) {
                        // Must be an instance of Filterable
                        assert($filterInstance instanceof Filterable);
 
                        // Try to execute this filter
                        try {
-                               //* DEBUG */ self::createDebugInstance(__CLASS__)->debugOutput('FILTER: ' . $filterInstance->__toString() . ': Processing started.');
+                               //* DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('FILTER: ' . $filterInstance->__toString() . ': Processing started.');
                                $filterInstance->execute($requestInstance, $responseInstance);
                                $filterInstance->execute($requestInstance, $responseInstance);
-                               //* DEBUG */ self::createDebugInstance(__CLASS__)->debugOutput('FILTER: ' . $filterInstance->__toString() . ': Processing ended.');
+                               //* DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('FILTER: ' . $filterInstance->__toString() . ': Processing ended.');
                        } catch (FilterChainException $e) {
                                // This exception can be thrown to just skip any further processing
                        } catch (FilterChainException $e) {
                                // This exception can be thrown to just skip any further processing
-                               self::createDebugInstance(__CLASS__)->debugOutput('Failed to execute lase filter ' . $filterInstance->__toString() . ': ' . $e->getMessage());
+                               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Failed to execute lase filter ' . $filterInstance->__toString() . ': ' . $e->getMessage());
                                break;
                        }
                } // END - foreach
                                break;
                        }
                } // END - foreach
index d1212ee35cd5c6f8b0afe3d3bb990467bde64ec4..5cdf4aff6eb108d0f8e12ecf2348a8ab442638ff 100644 (file)
@@ -108,7 +108,7 @@ abstract class BaseDataHandler extends BaseHandler {
         */
        protected function prepareAnswerMessage (array $messageData, Deliverable $packageInstance) {
                // Debug message
         */
        protected function prepareAnswerMessage (array $messageData, Deliverable $packageInstance) {
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('MESSAGE-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Going to send an answer message for ' . $this->getHandlerName() . ' ...');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MESSAGE-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Going to send an answer message for ' . $this->getHandlerName() . ' ...');
 
                // Get a helper instance based on this handler's name
                $helperInstance = ObjectFactory::createObjectByConfiguredName('node_answer_' . $this->getHandlerName() . '_helper_class', array($messageData));
 
                // Get a helper instance based on this handler's name
                $helperInstance = ObjectFactory::createObjectByConfiguredName('node_answer_' . $this->getHandlerName() . '_helper_class', array($messageData));
@@ -137,7 +137,7 @@ abstract class BaseDataHandler extends BaseHandler {
                $this->removeMessageConfigurationData($messageData);
 
                // Debug message
                $this->removeMessageConfigurationData($messageData);
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('MESSAGE-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Answer message has been prepared.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MESSAGE-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Answer message has been prepared.');
        }
 
        /**
        }
 
        /**
@@ -149,7 +149,7 @@ abstract class BaseDataHandler extends BaseHandler {
         */
        protected function prepareNextMessage (array $messageData, Deliverable $packageInstance) {
                // Debug message
         */
        protected function prepareNextMessage (array $messageData, Deliverable $packageInstance) {
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('MESSAGE-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Going to send next message ...');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MESSAGE-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Going to send next message ...');
 
                // Get a helper instance based on this handler's name
                $helperInstance = ObjectFactory::createObjectByConfiguredName('node_next_' . $this->getHandlerName() . '_helper_class', array($messageData));
 
                // Get a helper instance based on this handler's name
                $helperInstance = ObjectFactory::createObjectByConfiguredName('node_next_' . $this->getHandlerName() . '_helper_class', array($messageData));
@@ -178,7 +178,7 @@ abstract class BaseDataHandler extends BaseHandler {
                $this->removeMessageConfigurationData($messageData);
 
                // Debug message
                $this->removeMessageConfigurationData($messageData);
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('MESSAGE-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Next message has been prepared.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MESSAGE-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Next message has been prepared.');
        }
 
        /**
        }
 
        /**
index b87a8f60cdd4615db85a0bad0aa18990a21387d1..b52d3bd386825db688bb66970a7ebbe0bd36c16a 100644 (file)
@@ -55,7 +55,7 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
                $handlerInstance = new TaskHandler();
 
                // Output debug message
                $handlerInstance = new TaskHandler();
 
                // Output debug message
-               self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Initializing task handler.');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Initializing task handler.');
 
                // Init the task list
                $handlerInstance->setListInstance(ObjectFactory::createObjectByConfiguredName('task_list_class'));
 
                // Init the task list
                $handlerInstance->setListInstance(ObjectFactory::createObjectByConfiguredName('task_list_class'));
@@ -71,7 +71,7 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
                $handlerInstance->registerTask('idle_loop', $taskInstance);
 
                // Output debug message
                $handlerInstance->registerTask('idle_loop', $taskInstance);
 
                // Output debug message
-               self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Task handler initialized.');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Task handler initialized.');
 
                // Return the prepared instance
                return $handlerInstance;
 
                // Return the prepared instance
                return $handlerInstance;
@@ -106,7 +106,7 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
                        // Should we start now?
                        if ($diff < $currentTask['task_startup_delay']) {
                                // Skip this silently
                        // Should we start now?
                        if ($diff < $currentTask['task_startup_delay']) {
                                // Skip this silently
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Task ' . $currentTask['id'] . ' not started: diff=' . $diff . ',task_startup_delay=' . $currentTask['task_startup_delay']);
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Task ' . $currentTask['id'] . ' not started: diff=' . $diff . ',task_startup_delay=' . $currentTask['task_startup_delay']);
                                return;
                        } // END - if
 
                                return;
                        } // END - if
 
@@ -115,14 +115,14 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
                        $updateTask = TRUE;
 
                        // Debug message
                        $updateTask = TRUE;
 
                        // Debug message
-                       self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Task ' . $currentTask['id'] . ' started with startup_delay=' . $currentTask['task_startup_delay'] . 'ms');
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Task ' . $currentTask['id'] . ' started with startup_delay=' . $currentTask['task_startup_delay'] . 'ms');
                } // END - if
 
                // Get time difference from interval delay
                $diff = ($this->getMilliTime() - $currentTask['task_last_activity']) * 1000;
 
                // Debug message
                } // END - if
 
                // Get time difference from interval delay
                $diff = ($this->getMilliTime() - $currentTask['task_last_activity']) * 1000;
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Task ' . $currentTask['id'] . ' diff=' . $diff . ',task_interval_delay=' . $currentTask['task_interval_delay'] . ',task_max_runs=' . $currentTask['task_max_runs'] . ',task_total_runs=' . $currentTask['task_total_runs']);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Task ' . $currentTask['id'] . ' diff=' . $diff . ',task_interval_delay=' . $currentTask['task_interval_delay'] . ',task_max_runs=' . $currentTask['task_max_runs'] . ',task_total_runs=' . $currentTask['task_total_runs']);
 
                // Is the interval delay reached?
                if ((($diff < $currentTask['task_interval_delay']) && ($currentTask['task_max_runs'] == 0)) || (($currentTask['task_max_runs'] > 0) && ($currentTask['task_total_runs'] == $currentTask['task_max_runs']))) {
 
                // Is the interval delay reached?
                if ((($diff < $currentTask['task_interval_delay']) && ($currentTask['task_max_runs'] == 0)) || (($currentTask['task_max_runs'] > 0) && ($currentTask['task_total_runs'] == $currentTask['task_max_runs']))) {
@@ -175,13 +175,13 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
         */
        private function unregisterTask (array $taskData) {
                // Debug output
         */
        private function unregisterTask (array $taskData) {
                // Debug output
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Removing task ' . $taskData['id'] . ' from queue - CALLED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Removing task ' . $taskData['id'] . ' from queue - CALLED!');
 
                // Remove the entry
                $this->getListInstance()->removeEntry('tasks', $taskData);
 
                // Debug output
 
                // Remove the entry
                $this->getListInstance()->removeEntry('tasks', $taskData);
 
                // Debug output
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Removing task ' . $taskData['id'] . ' from queue - EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Removing task ' . $taskData['id'] . ' from queue - EXIT!');
         }
 
        /**
         }
 
        /**
@@ -260,7 +260,7 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
                $this->getListInstance()->addEntry('tasks', $taskEntry);
 
                // Debug message
                $this->getListInstance()->addEntry('tasks', $taskEntry);
 
                // Debug message
-               self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Task registered: taskName=' . $taskName .
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Task registered: taskName=' . $taskName .
                        ' (taskInstance=' . $taskInstance->__toString() . ')' .
                        ', startupDelay=' . $taskEntry['task_startup_delay'] . 'ms' .
                        ', intervalDelay=' . $taskEntry['task_interval_delay'] . 'ms' .
                        ' (taskInstance=' . $taskInstance->__toString() . ')' .
                        ', startupDelay=' . $taskEntry['task_startup_delay'] . 'ms' .
                        ', intervalDelay=' . $taskEntry['task_interval_delay'] . 'ms' .
@@ -314,7 +314,7 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
                $this->getListInstance()->getIterator()->rewind();
 
                // Debug message
                $this->getListInstance()->getIterator()->rewind();
 
                // Debug message
-               self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down all ' . $this->getListInstance()->count() . ' tasks...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down all ' . $this->getListInstance()->count() . ' tasks...');
 
                // Remember all tasks that has been shutdown for removal
                $tasks = array();
 
                // Remember all tasks that has been shutdown for removal
                $tasks = array();
@@ -328,7 +328,7 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
                        $currentTask = $this->getListInstance()->getIterator()->current();
 
                        // Output debug message
                        $currentTask = $this->getListInstance()->getIterator()->current();
 
                        // Output debug message
-                       self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down task ' . $currentTask['id'] . ' (taskInstance=' . $currentTask['task_instance']->__toString() . ') ...');
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down task ' . $currentTask['id'] . ' (taskInstance=' . $currentTask['task_instance']->__toString() . ') ...');
 
                        // Shutdown the task
                        $currentTask['task_instance']->accept($this->getVisitorInstance());
 
                        // Shutdown the task
                        $currentTask['task_instance']->accept($this->getVisitorInstance());
@@ -341,7 +341,7 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
                } // END - while
 
                // Debug message
                } // END - while
 
                // Debug message
-               self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Shutdown of all tasks completed.');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Shutdown of all tasks completed.');
 
                // Remove all tasks
                foreach ($tasks as $entry) {
 
                // Remove all tasks
                foreach ($tasks as $entry) {
index 1368fdb72709a02c1bcd4c19e20d9d1e3cee4336..34958ab05b052e729366a0dd959a362a50eaf390 100644 (file)
@@ -195,7 +195,7 @@ class BaseHelper extends BaseFrameworkSystem {
        public function assignFieldWithFilter ($fieldName, $filterMethod) {
                // Get the value
                $fieldValue = $this->getValueField($fieldName);
        public function assignFieldWithFilter ($fieldName, $filterMethod) {
                // Get the value
                $fieldValue = $this->getValueField($fieldName);
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($fieldName.'='.$fieldValue);
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput($fieldName.'='.$fieldValue);
 
                // Now filter it through the value through the filter method
                $filteredValue = call_user_func_array(array($this, 'doFilter' . self::convertToClassName($filterMethod)), array($fieldValue));
 
                // Now filter it through the value through the filter method
                $filteredValue = call_user_func_array(array($this, 'doFilter' . self::convertToClassName($filterMethod)), array($fieldValue));
@@ -213,14 +213,14 @@ class BaseHelper extends BaseFrameworkSystem {
         * @throws      NullPointerException    If recovery of requested value instance failed
         */
        public function prefetchValueInstance ($registryKey, $extraKey = NULL) {
         * @throws      NullPointerException    If recovery of requested value instance failed
         */
        public function prefetchValueInstance ($registryKey, $extraKey = NULL) {
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('O:'.$registryKey.'/'.$extraKey);
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('O:'.$registryKey.'/'.$extraKey);
                try {
                        // Get the required instance
                        $this->valueInstance = Registry::getRegistry()->getInstance($registryKey);
                } catch (NullPointerException $e) {
                        // Not set in registry
                        // @TODO Try to log it here
                try {
                        // Get the required instance
                        $this->valueInstance = Registry::getRegistry()->getInstance($registryKey);
                } catch (NullPointerException $e) {
                        // Not set in registry
                        // @TODO Try to log it here
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($registryKey.'=NULL!');
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput($registryKey.'=NULL!');
                }
 
                // Shall we get an extra instance?
                }
 
                // Shall we get an extra instance?
@@ -232,7 +232,7 @@ class BaseHelper extends BaseFrameworkSystem {
                                // Try to create it
                                $this->extraInstance = ObjectFactory::createObjectByConfiguredName($extraKey . '_class', array($this->valueInstance));
                        }
                                // Try to create it
                                $this->extraInstance = ObjectFactory::createObjectByConfiguredName($extraKey . '_class', array($this->valueInstance));
                        }
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($extraKey.'='.$this->extraInstance.' - EXTRA!');
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput($extraKey.'='.$this->extraInstance.' - EXTRA!');
                } // END - if
 
                // Is the value instance valid?
                } // END - if
 
                // Is the value instance valid?
@@ -478,11 +478,11 @@ class BaseHelper extends BaseFrameworkSystem {
                if ($this->getValueInstance()->isFieldSet($fieldName)) {
                        // Get the field value
                        $fieldValue = $this->getValueInstance()->getField($fieldName);
                if ($this->getValueInstance()->isFieldSet($fieldName)) {
                        // Get the field value
                        $fieldValue = $this->getValueInstance()->getField($fieldName);
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($fieldName.'[]='.gettype($fieldValue).'('.strlen($fieldValue).') - Value instance!');
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput($fieldName.'[]='.gettype($fieldValue).'('.strlen($fieldValue).') - Value instance!');
                } elseif ((!is_null($this->extraInstance)) && ($this->extraInstance->isFieldSet($fieldName))) {
                        // So try the extra instance
                        $fieldValue = $this->extraInstance->getField($fieldName);
                } elseif ((!is_null($this->extraInstance)) && ($this->extraInstance->isFieldSet($fieldName))) {
                        // So try the extra instance
                        $fieldValue = $this->extraInstance->getField($fieldName);
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($fieldName.'[]='.gettype($fieldValue).'('.strlen($fieldValue).') - Extra instance!');
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput($fieldName.'[]='.gettype($fieldValue).'('.strlen($fieldValue).') - Extra instance!');
                } else {
                        // Field is not set
                        $this->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] fieldName=' . $fieldName . ' is not set! - @TODO');
                } else {
                        // Field is not set
                        $this->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] fieldName=' . $fieldName . ' is not set! - @TODO');
index be4fe1fe45a5f6d93d776c101d1dad43a6ef36f0..8c000fa1e8d92d4bcd25f2febf2d0f6d26b2be66 100644 (file)
@@ -66,23 +66,23 @@ class BaseIndex extends BaseFrameworkSystem {
         * @return      void
         */
        public function readFileHeader () {
         * @return      void
         */
        public function readFileHeader () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
 
                // First rewind to beginning as the header sits at the beginning ...
                $this->getIteratorInstance()->rewind();
 
                // Then read it (see constructor for calculation)
                $data = $this->getIteratorInstance()->read($this->getIteratorInstance()->getHeaderSize());
 
                // First rewind to beginning as the header sits at the beginning ...
                $this->getIteratorInstance()->rewind();
 
                // Then read it (see constructor for calculation)
                $data = $this->getIteratorInstance()->read($this->getIteratorInstance()->getHeaderSize());
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Read %d bytes (%d wanted).', __METHOD__, __LINE__, strlen($data), $this->getIteratorInstance()->getHeaderSize()));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Read %d bytes (%d wanted).', __METHOD__, __LINE__, strlen($data), $this->getIteratorInstance()->getHeaderSize()));
 
                // Have all requested bytes been read?
                assert(strlen($data) == $this->getIteratorInstance()->getHeaderSize());
 
                // Have all requested bytes been read?
                assert(strlen($data) == $this->getIteratorInstance()->getHeaderSize());
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
 
                // Last character must be the separator
 
                // Last character must be the separator
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] data(-1)=%s', __METHOD__, __LINE__, dechex(ord(substr($data, -1, 1)))));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] data(-1)=%s', __METHOD__, __LINE__, dechex(ord(substr($data, -1, 1)))));
                assert(substr($data, -1, 1) == chr(BaseBinaryFile::SEPARATOR_HEADER_ENTRIES));
                assert(substr($data, -1, 1) == chr(BaseBinaryFile::SEPARATOR_HEADER_ENTRIES));
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
 
                // Okay, then remove it
                $data = substr($data, 0, -1);
 
                // Okay, then remove it
                $data = substr($data, 0, -1);
@@ -102,22 +102,22 @@ class BaseIndex extends BaseFrameworkSystem {
                $this->getIteratorInstance()->setHeader($header);
 
                // Check if the array has only 3 elements
                $this->getIteratorInstance()->setHeader($header);
 
                // Check if the array has only 3 elements
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] header(%d)=%s', __METHOD__, __LINE__, count($header), print_r($header, TRUE)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] header(%d)=%s', __METHOD__, __LINE__, count($header), print_r($header, TRUE)));
                assert(count($header) == 2);
                assert(count($header) == 2);
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
 
                // Check magic
                assert($header[0] == self::INDEX_MAGIC);
 
                // Check magic
                assert($header[0] == self::INDEX_MAGIC);
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
 
                // Check length of count
                assert(strlen($header[1]) == BaseBinaryFile::LENGTH_COUNT);
 
                // Check length of count
                assert(strlen($header[1]) == BaseBinaryFile::LENGTH_COUNT);
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
 
                // Decode count
                $header[1] = hex2bin($header[1]);
 
 
                // Decode count
                $header[1] = hex2bin($header[1]);
 
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
        }
 
        /**
        }
 
        /**
@@ -126,7 +126,7 @@ class BaseIndex extends BaseFrameworkSystem {
         * @return      void
         */
        public function flushFileHeader () {
         * @return      void
         */
        public function flushFileHeader () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
 
                // Put all informations together
                $header = sprintf('%s%s%s%s',
 
                // Put all informations together
                $header = sprintf('%s%s%s%s',
@@ -146,7 +146,7 @@ class BaseIndex extends BaseFrameworkSystem {
                // Write it to disk (header is always at seek position 0)
                $this->getIteratorInstance()->writeData(0, $header, FALSE);
 
                // Write it to disk (header is always at seek position 0)
                $this->getIteratorInstance()->writeData(0, $header, FALSE);
 
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
        }
 
        /**
        }
 
        /**
@@ -327,7 +327,7 @@ class BaseIndex extends BaseFrameworkSystem {
         * @throws      UnsupportedOperationException   This method is not (and maybe never will be) supported
         */
        public function writeData ($seekPosition, $data, $flushHeader = TRUE) {
         * @throws      UnsupportedOperationException   This method is not (and maybe never will be) supported
         */
        public function writeData ($seekPosition, $data, $flushHeader = TRUE) {
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] seekPosition=%s,data[]=%s,flushHeader=%d', __METHOD__, __LINE__, $seekPosition, gettype($data), intval($flushHeader)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] seekPosition=%s,data[]=%s,flushHeader=%d', __METHOD__, __LINE__, $seekPosition, gettype($data), intval($flushHeader)));
                throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getPointerInstance()), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getPointerInstance()), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
@@ -340,7 +340,7 @@ class BaseIndex extends BaseFrameworkSystem {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function writeValueToFile ($groupId, $value) {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function writeValueToFile ($groupId, $value) {
-               self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] groupId=' . $groupId . ',value[' . gettype($value) . ']=' . print_r($value, TRUE));
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] groupId=' . $groupId . ',value[' . gettype($value) . ']=' . print_r($value, TRUE));
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
@@ -353,7 +353,7 @@ class BaseIndex extends BaseFrameworkSystem {
         * @return      $data           Gap position and length of the raw data
         */
        public function writeDataToFreeGap ($groupId, $hash, $encoded) {
         * @return      $data           Gap position and length of the raw data
         */
        public function writeDataToFreeGap ($groupId, $hash, $encoded) {
-               self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] groupId=' . $groupId . ',hash=' . $hash . ',encoded()=' . strlen($encoded));
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] groupId=' . $groupId . ',hash=' . $hash . ',encoded()=' . strlen($encoded));
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
index 5076d808a4d6c9159912a35685a407b85a08daac..b1e04a96802caba90351158f71142e837b793eab 100644 (file)
@@ -64,7 +64,7 @@ class FileStackIndex extends BaseIndex implements IndexableStack, Registerable {
         */
        public function addHashToIndex ($groupId, array $data) {
                // Debug message
         */
        public function addHashToIndex ($groupId, array $data) {
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,gap=%d,length=%d - CALLED!', __METHOD__, __LINE__, $groupId, $data[BaseFileStack::ARRAY_INDEX_HASH], $data[BaseFileStack::ARRAY_INDEX_GAP_POSITION], $data[BaseFileStack::ARRAY_INDEX_DATA_LENGTH]));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,gap=%d,length=%d - CALLED!', __METHOD__, __LINE__, $groupId, $data[BaseFileStack::ARRAY_INDEX_HASH], $data[BaseFileStack::ARRAY_INDEX_GAP_POSITION], $data[BaseFileStack::ARRAY_INDEX_DATA_LENGTH]));
 
                // Raw data been written to the file
                $rawData = sprintf('%s%s%s%s%s%s%s',
 
                // Raw data been written to the file
                $rawData = sprintf('%s%s%s%s%s%s%s',
@@ -78,7 +78,7 @@ class FileStackIndex extends BaseIndex implements IndexableStack, Registerable {
                );
 
                // Debug message
                );
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,rawData()=%d', __METHOD__, __LINE__, $groupId, $data[BaseFileStack::ARRAY_INDEX_HASH], strlen($rawData)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,rawData()=%d', __METHOD__, __LINE__, $groupId, $data[BaseFileStack::ARRAY_INDEX_HASH], strlen($rawData)));
 
                // Search for next free gap
                $gapPosition = $this->getIteratorInstance()->searchNextGap(strlen($rawData));
 
                // Search for next free gap
                $gapPosition = $this->getIteratorInstance()->searchNextGap(strlen($rawData));
@@ -87,13 +87,13 @@ class FileStackIndex extends BaseIndex implements IndexableStack, Registerable {
                assert($gapPosition > $this->getIteratorInstance()->getHeaderSize());
 
                // Debug message
                assert($gapPosition > $this->getIteratorInstance()->getHeaderSize());
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,gapPosition=%s', __METHOD__, __LINE__, $groupId, $data[BaseFileStack::ARRAY_INDEX_HASH], $gapPosition));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,gapPosition=%s', __METHOD__, __LINE__, $groupId, $data[BaseFileStack::ARRAY_INDEX_HASH], $gapPosition));
 
                // Then write the data at that gap
                $this->getIteratorInstance()->writeData($gapPosition, $rawData);
 
                // Debug message
 
                // Then write the data at that gap
                $this->getIteratorInstance()->writeData($gapPosition, $rawData);
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,rawData()=%d - EXIT!', __METHOD__, __LINE__, $groupId, $data[BaseFileStack::ARRAY_INDEX_HASH], strlen($rawData)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,rawData()=%d - EXIT!', __METHOD__, __LINE__, $groupId, $data[BaseFileStack::ARRAY_INDEX_HASH], strlen($rawData)));
        }
 
        /**
        }
 
        /**
index e28045cb69fc1191bf96d01c7edd7c1482132896..5b0c5cd86a9e0ceed3fb2b92273cb385f2622de7 100644 (file)
@@ -46,7 +46,7 @@ class FileIterator extends BaseIterator implements SeekableWritableFileIterator
                $iteratorInstance = new FileIterator();
 
                // Set the instance here
                $iteratorInstance = new FileIterator();
 
                // Set the instance here
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d] Setting blockInstance=%s ...', __METHOD__, __LINE__, $blockInstance->__toString()));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d] Setting blockInstance=%s ...', __METHOD__, __LINE__, $blockInstance->__toString()));
                $iteratorInstance->setBlockInstance($blockInstance);
 
                // Return the prepared instance
                $iteratorInstance->setBlockInstance($blockInstance);
 
                // Return the prepared instance
index 920819b7a2925751dec4bceadea49bea56cbcea7..ff89553e3e88abb347d740ae1bef1b34623c29f0 100644 (file)
@@ -84,7 +84,7 @@ class BaseListener extends BaseFrameworkSystem implements Visitable {
                // We need to clear the error here if it is a resource
                if ($isServerSocket === TRUE) {
                        // Clear the error
                // We need to clear the error here if it is a resource
                if ($isServerSocket === TRUE) {
                        // Clear the error
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('socketResource[]=' . gettype($socketResource));
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('socketResource[]=' . gettype($socketResource));
                        socket_clear_error($socketResource);
                } // END - if
 
                        socket_clear_error($socketResource);
                } // END - if
 
@@ -268,7 +268,7 @@ class BaseListener extends BaseFrameworkSystem implements Visitable {
         */
        public function accept (Visitor $visitorInstance) {
                // Debug message
         */
        public function accept (Visitor $visitorInstance) {
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - CALLED!');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - CALLED!');
 
                // Visit this listener
                $visitorInstance->visitListener($this);
 
                // Visit this listener
                $visitorInstance->visitListener($this);
@@ -279,7 +279,7 @@ class BaseListener extends BaseFrameworkSystem implements Visitable {
                } // END - if
 
                // Debug message
                } // END - if
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - EXIT!');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - EXIT!');
        }
 
        /**
        }
 
        /**
@@ -376,7 +376,7 @@ class BaseListener extends BaseFrameworkSystem implements Visitable {
 
                        default: // Everything else <> 0
                                // Unhandled error code detected, so first debug it because we may want to handle it like the others
 
                        default: // Everything else <> 0
                                // Unhandled error code detected, so first debug it because we may want to handle it like the others
-                               self::createDebugInstance(__CLASS__)->debugOutput('BASE-HUB[' . __METHOD__ . ':' . __LINE__ . '] UNKNOWN ERROR CODE = ' . $errorCode . ', MESSAGE = ' . socket_strerror($errorCode));
+                               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-HUB[' . __METHOD__ . ':' . __LINE__ . '] UNKNOWN ERROR CODE = ' . $errorCode . ', MESSAGE = ' . socket_strerror($errorCode));
 
                                // Change it only in this class
                                $errorName = BaseRawDataHandler::SOCKET_ERROR_UNKNOWN;
 
                                // Change it only in this class
                                $errorName = BaseRawDataHandler::SOCKET_ERROR_UNKNOWN;
@@ -396,7 +396,7 @@ class BaseListener extends BaseFrameworkSystem implements Visitable {
         */
        public function shutdownSocket ($socketResource) {
                // Debug message
         */
        public function shutdownSocket ($socketResource) {
                // Debug message
-               self::createDebugInstance(__CLASS__)->debugOutput('HUB-SYSTEM: Shutting down socket resource ' . $socketResource . ' with state ' . $this->getPrintableState() . ' ...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-SYSTEM: Shutting down socket resource ' . $socketResource . ' with state ' . $this->getPrintableState() . ' ...');
 
                // Set socket resource
                $this->setSocketResource($socketResource);
 
                // Set socket resource
                $this->setSocketResource($socketResource);
@@ -405,7 +405,7 @@ class BaseListener extends BaseFrameworkSystem implements Visitable {
                $visitorInstance = ObjectFactory::createObjectByConfiguredName('shutdown_socket_visitor_class');
 
                // Debug output
                $visitorInstance = ObjectFactory::createObjectByConfiguredName('shutdown_socket_visitor_class');
 
                // Debug output
-               self::createDebugInstance(__CLASS__)->debugOutput('HUB-SYSTEM:' . $this->__toString() . ': visitorInstance=' . $visitorInstance->__toString());
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-SYSTEM:' . $this->__toString() . ': visitorInstance=' . $visitorInstance->__toString());
 
                // Call the visitor
                $this->accept($visitorInstance);
 
                // Call the visitor
                $this->accept($visitorInstance);
@@ -420,7 +420,7 @@ class BaseListener extends BaseFrameworkSystem implements Visitable {
         */
        public function halfShutdownSocket ($socketResource) {
                // Debug message
         */
        public function halfShutdownSocket ($socketResource) {
                // Debug message
-               self::createDebugInstance(__CLASS__)->debugOutput('HUB-SYSTEM: Half-shutting down socket resource ' . $socketResource . ' with state ' . $this->getPrintableState() . ' ...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-SYSTEM: Half-shutting down socket resource ' . $socketResource . ' with state ' . $this->getPrintableState() . ' ...');
 
                // Set socket resource
                $this->setSocketResource($socketResource);
 
                // Set socket resource
                $this->setSocketResource($socketResource);
@@ -429,7 +429,7 @@ class BaseListener extends BaseFrameworkSystem implements Visitable {
                $visitorInstance = ObjectFactory::createObjectByConfiguredName('half_shutdown_socket_visitor_class');
 
                // Debug output
                $visitorInstance = ObjectFactory::createObjectByConfiguredName('half_shutdown_socket_visitor_class');
 
                // Debug output
-               self::createDebugInstance(__CLASS__)->debugOutput('HUB-SYSTEM:' . $this->__toString() . ': visitorInstance=' . $visitorInstance->__toString());
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-SYSTEM:' . $this->__toString() . ': visitorInstance=' . $visitorInstance->__toString());
 
                // Call the visitor
                $this->accept($visitorInstance);
 
                // Call the visitor
                $this->accept($visitorInstance);
@@ -491,14 +491,14 @@ class BaseListener extends BaseFrameworkSystem implements Visitable {
                // Some new peers found?
                if ($left < 1) {
                        // Debug message
                // Some new peers found?
                if ($left < 1) {
                        // Debug message
-                       //* EXTREME-NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TCP-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: left=' . $left . ',serverSocket=' . $this->getSocketResource() . ',readers=' . print_r($readers, TRUE));
+                       //* EXTREME-NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: left=' . $left . ',serverSocket=' . $this->getSocketResource() . ',readers=' . print_r($readers, TRUE));
 
                        // Nothing new found
                        return;
                } // END - if
 
                // Debug message
 
                        // Nothing new found
                        return;
                } // END - if
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TCP-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: serverSocket=' . $this->getSocketResource() . ',readers=' . print_r($readers, TRUE));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: serverSocket=' . $this->getSocketResource() . ',readers=' . print_r($readers, TRUE));
 
                // Do we have changed peers?
                if (in_array($this->getSocketResource(), $readers)) {
 
                // Do we have changed peers?
                if (in_array($this->getSocketResource(), $readers)) {
@@ -512,7 +512,7 @@ class BaseListener extends BaseFrameworkSystem implements Visitable {
                        $newSocket = socket_accept($this->getSocketResource());
 
                        // Debug message
                        $newSocket = socket_accept($this->getSocketResource());
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TCP-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: newSocket=' . $newSocket . ',serverSocket=' .$this->getSocketResource());
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: newSocket=' . $newSocket . ',serverSocket=' .$this->getSocketResource());
 
                        // Array for timeout settings
                        $options  = array(
 
                        // Array for timeout settings
                        $options  = array(
@@ -532,7 +532,7 @@ class BaseListener extends BaseFrameworkSystem implements Visitable {
                        // Output result (only for debugging!)
                        /*
                        $option = socket_get_option($newSocket, SOL_SOCKET, SO_RCVTIMEO);
                        // Output result (only for debugging!)
                        /*
                        $option = socket_get_option($newSocket, SOL_SOCKET, SO_RCVTIMEO);
-                       self::createDebugInstance(__CLASS__)->debugOutput('SO_RCVTIMEO[' . gettype($option) . ']=' . print_r($option, TRUE));
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SO_RCVTIMEO[' . gettype($option) . ']=' . print_r($option, TRUE));
                        */
 
                        // Enable SO_OOBINLINE
                        */
 
                        // Enable SO_OOBINLINE
@@ -589,7 +589,7 @@ class BaseListener extends BaseFrameworkSystem implements Visitable {
                $currentSocket = $this->getIteratorInstance()->current();
 
                // Handle it here, if not main server socket
                $currentSocket = $this->getIteratorInstance()->current();
 
                // Handle it here, if not main server socket
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TCP-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: currentSocket=' . $currentSocket[BasePool::SOCKET_ARRAY_RESOURCE] . ',type=' . $currentSocket[BasePool::SOCKET_ARRAY_CONN_TYPE] . ',serverSocket=' . $this->getSocketResource());
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: currentSocket=' . $currentSocket[BasePool::SOCKET_ARRAY_RESOURCE] . ',type=' . $currentSocket[BasePool::SOCKET_ARRAY_CONN_TYPE] . ',serverSocket=' . $this->getSocketResource());
                if (($currentSocket[BasePool::SOCKET_ARRAY_CONN_TYPE] != BaseConnectionHelper::CONNECTION_TYPE_SERVER) && ($currentSocket[BasePool::SOCKET_ARRAY_RESOURCE] != $this->getSocketResource())) {
                        // ... or else it will raise warnings like 'Transport endpoint is not connected'
                        $this->getHandlerInstance()->processRawDataFromResource($currentSocket);
                if (($currentSocket[BasePool::SOCKET_ARRAY_CONN_TYPE] != BaseConnectionHelper::CONNECTION_TYPE_SERVER) && ($currentSocket[BasePool::SOCKET_ARRAY_RESOURCE] != $this->getSocketResource())) {
                        // ... or else it will raise warnings like 'Transport endpoint is not connected'
                        $this->getHandlerInstance()->processRawDataFromResource($currentSocket);
index adaa544a18ac7491d13a824effc8f1dd54813206..9310865259a7673bfeb2750607f4c7cde5e2e510 100644 (file)
@@ -127,7 +127,7 @@ class BaseListenerDecorator extends BaseDecorator implements Visitable {
                 */
                if (!$handlerInstance instanceof Networkable) {
                        // Skip this silently for now. Later on, this will become mandatory!
                 */
                if (!$handlerInstance instanceof Networkable) {
                        // Skip this silently for now. Later on, this will become mandatory!
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('No handler assigned to this listener decorator. this=' . $this->__toString() . ', listenerInstance=' . $this->getListenerInstance()->__toString());
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('No handler assigned to this listener decorator. this=' . $this->__toString() . ', listenerInstance=' . $this->getListenerInstance()->__toString());
                        return;
                } // END - if
 
                        return;
                } // END - if
 
@@ -147,7 +147,7 @@ class BaseListenerDecorator extends BaseDecorator implements Visitable {
                 * know if the decoded data origins from a TCP or UDP connection so it
                 * can just be passed over to the network package receiver.
                 */
                 * know if the decoded data origins from a TCP or UDP connection so it
                 * can just be passed over to the network package receiver.
                 */
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-LISTENER-DECORATOR[' . __METHOD__ . ':' . __LINE__ . '] Going to handle over some raw data to receiver instance (' . $receiverInstance->__toString() . ') ...');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LISTENER-DECORATOR[' . __METHOD__ . ':' . __LINE__ . '] Going to handle over some raw data to receiver instance (' . $receiverInstance->__toString() . ') ...');
                $receiverInstance->addRawDataToIncomingStack($handlerInstance);
        }
 
                $receiverInstance->addRawDataToIncomingStack($handlerInstance);
        }
 
index eafa15c5fe18ba4a60340a59c3ff01b21364e4dc..1b12a3a61859991de2e2d8ce503a3a532a40c6ac 100644 (file)
@@ -82,7 +82,7 @@ class SocketFileListener extends BaseListener implements Listenable {
                $socketFile = self::createTempPathForFile($this->getConfigInstance()->getConfigEntry('ipc_socket_file_name'));
 
                // Debug message
                $socketFile = self::createTempPathForFile($this->getConfigInstance()->getConfigEntry('ipc_socket_file_name'));
 
                // Debug message
-               self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: socketFile=' . $socketFile . ' ...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: socketFile=' . $socketFile . ' ...');
 
                // File name must not be empty
                assert(!empty($socketFile));
 
                // File name must not be empty
                assert(!empty($socketFile));
@@ -90,7 +90,7 @@ class SocketFileListener extends BaseListener implements Listenable {
                // Is the file there?
                if ((self::isReachableFilePath($socketFile)) && (file_exists($socketFile))) {
                        // Old socket found
                // Is the file there?
                if ((self::isReachableFilePath($socketFile)) && (file_exists($socketFile))) {
                        // Old socket found
-                       self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: WARNING: Old socket at ' . $socketFile . ' found. Will not start.');
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: WARNING: Old socket at ' . $socketFile . ' found. Will not start.');
 
                        // Shutdown this socket
                        $this->shutdownSocket($mainSocket);
 
                        // Shutdown this socket
                        $this->shutdownSocket($mainSocket);
@@ -100,7 +100,7 @@ class SocketFileListener extends BaseListener implements Listenable {
                } // END - if
 
                // Debug message
                } // END - if
 
                // Debug message
-               self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: Binding to ' . $socketFile . ' ...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: Binding to ' . $socketFile . ' ...');
 
                // Try to bind to it
                if (!socket_bind($mainSocket, $socketFile)) {
 
                // Try to bind to it
                if (!socket_bind($mainSocket, $socketFile)) {
@@ -122,7 +122,7 @@ class SocketFileListener extends BaseListener implements Listenable {
                } // END - if
 
                // Start listen for connections
                } // END - if
 
                // Start listen for connections
-               self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: Listening for connections.');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: Listening for connections.');
                if (!socket_listen($mainSocket)) {
                        // Handle this socket error with a faked recipientData array
                        $this->handleSocketError(__METHOD__, __LINE__, $mainSocket, array($socketFile, '0'));
                if (!socket_listen($mainSocket)) {
                        // Handle this socket error with a faked recipientData array
                        $this->handleSocketError(__METHOD__, __LINE__, $mainSocket, array($socketFile, '0'));
@@ -142,7 +142,7 @@ class SocketFileListener extends BaseListener implements Listenable {
                } // END - if
 
                // Now, we want non-blocking mode
                } // END - if
 
                // Now, we want non-blocking mode
-               self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: Setting non-blocking mode.');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: Setting non-blocking mode.');
                if (!socket_set_nonblock($mainSocket)) {
                        // Handle this socket error with a faked recipientData array
                        $this->handleSocketError(__METHOD__, __LINE__, $mainSocket, array($socketFile, '0'));
                if (!socket_set_nonblock($mainSocket)) {
                        // Handle this socket error with a faked recipientData array
                        $this->handleSocketError(__METHOD__, __LINE__, $mainSocket, array($socketFile, '0'));
@@ -187,7 +187,7 @@ class SocketFileListener extends BaseListener implements Listenable {
                $this->setHandlerInstance($handlerInstance);
 
                // Output message
                $this->setHandlerInstance($handlerInstance);
 
                // Output message
-               self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: Socket listener now ready on socket ' . $socketFile . ' for service.');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: Socket listener now ready on socket ' . $socketFile . ' for service.');
        }
 
        /**
        }
 
        /**
index 5218382be471bfcf73a96301ef3136b2adc5aca6..4c32332c9ad4c6a803ab6610375874a1e114aa93 100644 (file)
@@ -90,7 +90,7 @@ class BaseList extends BaseFrameworkSystem implements IteratorAggregate, Countab
         * @return      $isset          Whether the group is valid
         */
        public function isGroupSet ($groupName) {
         * @return      $isset          Whether the group is valid
         */
        public function isGroupSet ($groupName) {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName);
                return isset($this->listGroups[$groupName]);
        }
 
                return isset($this->listGroups[$groupName]);
        }
 
@@ -102,7 +102,7 @@ class BaseList extends BaseFrameworkSystem implements IteratorAggregate, Countab
         * @throws      ListGroupAlreadyAddedException  If the given group is already added
         */
        public function addGroup ($groupName) {
         * @throws      ListGroupAlreadyAddedException  If the given group is already added
         */
        public function addGroup ($groupName) {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ' - CALLED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ' - CALLED!');
                // Is the group already added?
                if ($this->isGroupSet($groupName)) {
                        // Throw the exception here
                // Is the group already added?
                if ($this->isGroupSet($groupName)) {
                        // Throw the exception here
@@ -111,7 +111,7 @@ class BaseList extends BaseFrameworkSystem implements IteratorAggregate, Countab
 
                // Add the group which is a simple array
                $this->listGroups[$groupName] = ObjectFactory::createObjectByConfiguredName('list_group_class');
 
                // Add the group which is a simple array
                $this->listGroups[$groupName] = ObjectFactory::createObjectByConfiguredName('list_group_class');
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ' - EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ' - EXIT!');
        }
 
        /**
        }
 
        /**
@@ -125,7 +125,7 @@ class BaseList extends BaseFrameworkSystem implements IteratorAggregate, Countab
         */
        public function addInstance ($groupName, $subGroup, Visitable $visitableInstance) {
                // Debug message
         */
        public function addInstance ($groupName, $subGroup, Visitable $visitableInstance) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName  . ',subGroup=' . $subGroup . ',visitableInstance=' . $visitableInstance->__toString() . ' - CALLED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName  . ',subGroup=' . $subGroup . ',visitableInstance=' . $visitableInstance->__toString() . ' - CALLED!');
 
                // Is the group there?
                if (!$this->isGroupSet($groupName)) {
 
                // Is the group there?
                if (!$this->isGroupSet($groupName)) {
@@ -143,10 +143,10 @@ class BaseList extends BaseFrameworkSystem implements IteratorAggregate, Countab
                $hash = $this->generateHash($groupName, $subGroup, $visitableInstance);
 
                // Debug message
                $hash = $this->generateHash($groupName, $subGroup, $visitableInstance);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName  . ',subGroup=' . $subGroup . ',hash=' . $hash . ' - Calling addEntry() ...');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName  . ',subGroup=' . $subGroup . ',hash=' . $hash . ' - Calling addEntry() ...');
 
                // Now add it to the group list and hash it
 
                // Now add it to the group list and hash it
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',this->listGroups[' . $groupName . ']=' . $this->listGroups[$groupName]->__toString());
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',this->listGroups[' . $groupName . ']=' . $this->listGroups[$groupName]->__toString());
                //$this->listGroups[$groupName]->addEntry($subGroup, $hash);
 
                // Add the hash to the index
                //$this->listGroups[$groupName]->addEntry($subGroup, $hash);
 
                // Add the hash to the index
@@ -156,7 +156,7 @@ class BaseList extends BaseFrameworkSystem implements IteratorAggregate, Countab
                $this->listEntries[$hash] = $visitableInstance;
 
                // Debug message
                $this->listEntries[$hash] = $visitableInstance;
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName  . ',subGroup=' . $subGroup . ' - EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName  . ',subGroup=' . $subGroup . ' - EXIT!');
        }
 
        /**
        }
 
        /**
@@ -168,7 +168,7 @@ class BaseList extends BaseFrameworkSystem implements IteratorAggregate, Countab
         */
        public final function getArrayFromList ($list) {
                // Debug message
         */
        public final function getArrayFromList ($list) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',list[' . gettype($list) . ']=' . $list . ' - CALLED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',list[' . gettype($list) . ']=' . $list . ' - CALLED!');
 
                // Is the group there?
                if ((!is_null($list)) && (!$this->isGroupSet($list))) {
 
                // Is the group there?
                if ((!is_null($list)) && (!$this->isGroupSet($list))) {
@@ -188,18 +188,18 @@ class BaseList extends BaseFrameworkSystem implements IteratorAggregate, Countab
                // Walk through all entries
                foreach ($this->listIndex as $hash) {
                        // Debug message
                // Walk through all entries
                foreach ($this->listIndex as $hash) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: hash=' . $hash);
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: hash=' . $hash);
 
                        // Is the list entry set?
                        if ($this->isHashValid($hash)) {
                                // Add it
                                array_push($array, $this->listEntries[$hash]);
 
                        // Is the list entry set?
                        if ($this->isHashValid($hash)) {
                                // Add it
                                array_push($array, $this->listEntries[$hash]);
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: hash=' . $hash . ',array(' . count($array) . ')=' . print_r($array, TRUE) . ' - ADDED!');
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: hash=' . $hash . ',array(' . count($array) . ')=' . print_r($array, TRUE) . ' - ADDED!');
                        } // END - if
                } // END - foreach
 
                // Debug message
                        } // END - if
                } // END - foreach
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',list[' . gettype($list) . ']=' . $list . ',array()=' . count($array) . ' - EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',list[' . gettype($list) . ']=' . $list . ',array()=' . count($array) . ' - EXIT!');
 
                // Return it
                return $array;
 
                // Return it
                return $array;
@@ -215,7 +215,7 @@ class BaseList extends BaseFrameworkSystem implements IteratorAggregate, Countab
         */
        public function addEntry ($groupName, $entry) {
                // Debug message
         */
        public function addEntry ($groupName, $entry) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ' - CALLED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ' - CALLED!');
 
                // Is the group already added?
                if (!$this->isGroupSet($groupName)) {
 
                // Is the group already added?
                if (!$this->isGroupSet($groupName)) {
@@ -227,19 +227,19 @@ class BaseList extends BaseFrameworkSystem implements IteratorAggregate, Countab
                $hash = $this->generateHash($groupName, $groupName, $entry);
 
                // Debug message
                $hash = $this->generateHash($groupName, $groupName, $entry);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ',entry=' . print_r($entry, TRUE) . ', hash=' . $hash);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ',entry=' . print_r($entry, TRUE) . ', hash=' . $hash);
 
                // Add the hash to the index
                array_push($this->listIndex, $hash);
 
                // Debug message
 
                // Add the hash to the index
                array_push($this->listIndex, $hash);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ',listEntries()=' . count($this->listEntries));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ',listEntries()=' . count($this->listEntries));
 
                // Now add the entry to the list
                $this->listEntries[$hash] = $entry;
 
                // Debug message
 
                // Now add the entry to the list
                $this->listEntries[$hash] = $entry;
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ',listEntries()=' . count($this->listEntries) . ' - EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ',listEntries()=' . count($this->listEntries) . ' - EXIT!');
        }
 
        /**
        }
 
        /**
@@ -252,7 +252,7 @@ class BaseList extends BaseFrameworkSystem implements IteratorAggregate, Countab
         */
        public function removeEntry ($groupName, $entry) {
                // Debug message
         */
        public function removeEntry ($groupName, $entry) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ' - CALLED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ' - CALLED!');
 
                // Is the group already added?
                if (!$this->isGroupSet($groupName)) {
 
                // Is the group already added?
                if (!$this->isGroupSet($groupName)) {
@@ -264,7 +264,7 @@ class BaseList extends BaseFrameworkSystem implements IteratorAggregate, Countab
                $hash = $this->generateHash($groupName, $groupName, $entry);
 
                // Debug message
                $hash = $this->generateHash($groupName, $groupName, $entry);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ',entry=' . $entry . ', hash=' . $hash);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ',entry=' . $entry . ', hash=' . $hash);
 
                // Remove it from the list ...
                unset($this->listEntries[$hash]);
 
                // Remove it from the list ...
                unset($this->listEntries[$hash]);
@@ -273,7 +273,7 @@ class BaseList extends BaseFrameworkSystem implements IteratorAggregate, Countab
                unset($this->listIndex[array_search($hash, $this->listIndex)]);
 
                // Debug message
                unset($this->listIndex[array_search($hash, $this->listIndex)]);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ' - EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ' - EXIT!');
        }
 
        /**
        }
 
        /**
@@ -308,7 +308,7 @@ class BaseList extends BaseFrameworkSystem implements IteratorAggregate, Countab
                        $entry2 = crc32($entry[BasePool::SOCKET_ARRAY_RESOURCE] . ':' . $entry[BasePool::SOCKET_ARRAY_CONN_TYPE]);
                } else {
                        // Unsupported type detected
                        $entry2 = crc32($entry[BasePool::SOCKET_ARRAY_RESOURCE] . ':' . $entry[BasePool::SOCKET_ARRAY_CONN_TYPE]);
                } else {
                        // Unsupported type detected
-                       self::createDebugInstance(__CLASS__)->debugOutput('BASE-LIST[' . __METHOD__ . ':' . __LINE__ . ']: Entry type ' . gettype($entry) . ' is unsupported.');
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST[' . __METHOD__ . ':' . __LINE__ . ']: Entry type ' . gettype($entry) . ' is unsupported.');
 
                        // @TODO Extend this somehow?
                        $entry2 = gettype($entry);
 
                        // @TODO Extend this somehow?
                        $entry2 = gettype($entry);
@@ -452,7 +452,7 @@ class BaseList extends BaseFrameworkSystem implements IteratorAggregate, Countab
                        $entry = $this->getEntry($entryIndex);
 
                        // Debug message
                        $entry = $this->getEntry($entryIndex);
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('LIST: Adding entry ' . $entry . ' ...');
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LIST: Adding entry ' . $entry . ' ...');
 
                        // Add it to the list
                        $entries[$iteratorInstance->current()] = $entry;
 
                        // Add it to the list
                        $entries[$iteratorInstance->current()] = $entry;
index 5ce3f3fcf649de3a1a14b9bcd4d602f8b8f8a20b..fb309963cb7be42f42f50e74590187cb67da0db3 100644 (file)
@@ -71,7 +71,7 @@ class BaseMenu extends BaseFrameworkSystem {
                        $templateInstance->loadMenuTemplate($command . '_menu_entries');
                } catch (FileNotFoundException $e) {
                        // Log exception @TODO Maybe to intrusive?
                        $templateInstance->loadMenuTemplate($command . '_menu_entries');
                } catch (FileNotFoundException $e) {
                        // Log exception @TODO Maybe to intrusive?
-                       self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: Exception caught: ' . $e->__toString() . ', with message: ' . $e->getMessage());
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: Exception caught: ' . $e->__toString() . ', with message: ' . $e->getMessage());
                }
 
                // Render template data here
                }
 
                // Render template data here
index 372bd47d5cd52ed6e217508718c188f4e8e9da24..d08c13242ebdf6df5590d51100cd044d88779bf2 100644 (file)
@@ -118,7 +118,7 @@ class ConsoleOutput extends BaseOutput implements OutputStreamer {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function seek ($offset, $whence = SEEK_SET) {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function seek ($offset, $whence = SEEK_SET) {
-               self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] offset=' . $offset . ',whence=' . $whence);
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] offset=' . $offset . ',whence=' . $whence);
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
index 181248fec47507b2b233ee7803f1ec2fef602d96..8c0a749ae3839c723f818a7311b419f6aa5781a3 100644 (file)
@@ -103,7 +103,7 @@ class DebugConsoleOutput extends BaseDebugOutput implements Debugger, OutputStre
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function streamData ($data) {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function streamData ($data) {
-               self::createDebugInstance(__CLASS__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
@@ -126,7 +126,7 @@ class DebugConsoleOutput extends BaseDebugOutput implements Debugger, OutputStre
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function seek ($offset, $whence = SEEK_SET) {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function seek ($offset, $whence = SEEK_SET) {
-               self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] offset=' . $offset . ',whence=' . $whence);
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] offset=' . $offset . ',whence=' . $whence);
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
index 464e266d6fd11ebb82d89c65b21ae3cff9a3e306..2ea7da73535aca82765f6d9d4be5e2327910d575 100644 (file)
@@ -99,7 +99,7 @@ class DebugErrorLogOutput extends BaseDebugOutput implements Debugger, OutputStr
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function streamData ($data) {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function streamData ($data) {
-               self::createDebugInstance(__CLASS__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
@@ -122,7 +122,7 @@ class DebugErrorLogOutput extends BaseDebugOutput implements Debugger, OutputStr
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function seek ($offset, $whence = SEEK_SET) {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function seek ($offset, $whence = SEEK_SET) {
-               self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] offset=' . $offset . ',whence=' . $whence);
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] offset=' . $offset . ',whence=' . $whence);
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
index ff003f663ae0bac714befaac0c5397e74ff0c082..4093172adf8973ef9635b03b0129d0d075894cb8 100644 (file)
@@ -88,7 +88,7 @@ class DebugWebOutput extends BaseDebugOutput implements Debugger, OutputStreamer
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function streamData ($data) {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function streamData ($data) {
-               self::createDebugInstance(__CLASS__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
@@ -111,7 +111,7 @@ class DebugWebOutput extends BaseDebugOutput implements Debugger, OutputStreamer
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function seek ($offset, $whence = SEEK_SET) {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function seek ($offset, $whence = SEEK_SET) {
-               self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] offset=' . $offset . ',whence=' . $whence);
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] offset=' . $offset . ',whence=' . $whence);
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
index b5dce66894699fe856647b3fda6ca5a0f736842f..e1299ef1157f9f12a17dea3466789dcc4a937129 100644 (file)
@@ -103,7 +103,7 @@ class WebOutput extends BaseOutput implements OutputStreamer, Registerable {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function seek ($offset, $whence = SEEK_SET) {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function seek ($offset, $whence = SEEK_SET) {
-               self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] offset=' . $offset . ',whence=' . $whence);
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] offset=' . $offset . ',whence=' . $whence);
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
index 44c2844149fb0ff809ad5793cefd8e319a62dbbd..318e344bf205fa68fb8e127430ea6a47b0f4ab81 100644 (file)
@@ -71,9 +71,9 @@ class XmlParser extends BaseParser implements Parseable {
                // Convert all to UTF8
                if (empty($content)) {
                        // No empty content!
                // Convert all to UTF8
                if (empty($content)) {
                        // No empty content!
-                       self::createDebugInstance(__CLASS__)->debugOutput('Empty content! Backtrace: <pre>');
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Empty content! Backtrace: <pre>');
                        debug_print_backtrace();
                        debug_print_backtrace();
-                       self::createDebugInstance(__CLASS__)->debugOutput('</pre>');
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('</pre>');
                        exit();
                } elseif (function_exists('recode')) {
                        // Recode found, so use it
                        exit();
                } elseif (function_exists('recode')) {
                        // Recode found, so use it
index 9e7617f4e9253dfc42c2d13cb9c062cb7bfc28d5..9d47a9a1509a6a5bcacbbf4df83452215e7498c5 100644 (file)
@@ -140,12 +140,12 @@ class BaseRegistry extends BaseFrameworkSystem implements Registerable {
                $entry = array();
 
                // Debug message
                $entry = array();
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Checking arrayKey=' . $arrayKey . ',lookFor=' . $lookFor);
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Checking arrayKey=' . $arrayKey . ',lookFor=' . $lookFor);
 
                // "Walk" over all entries
                foreach ($this->getEntries($arrayKey) as $key => $value) {
                        // Debug message
 
                // "Walk" over all entries
                foreach ($this->getEntries($arrayKey) as $key => $value) {
                        // Debug message
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Checking key=' . $key . ',value=' . $value . ',lookFor=' . $lookFor);
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Checking key=' . $key . ',value=' . $value . ',lookFor=' . $lookFor);
 
                        // If $value matches the $lookFor, we need to look for more entries for this!
                        if ($lookFor == $value) {
 
                        // If $value matches the $lookFor, we need to look for more entries for this!
                        if ($lookFor == $value) {
@@ -154,7 +154,7 @@ class BaseRegistry extends BaseFrameworkSystem implements Registerable {
                                        // Now "walk" through all entries, if an array is returned
                                        if (is_array($value2)) {
                                                // Debug message
                                        // Now "walk" through all entries, if an array is returned
                                        if (is_array($value2)) {
                                                // Debug message
-                                               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Checking key2=' . $key2 . ',value2()=' . count($value2) . ',lookFor=' . $lookFor);
+                                               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Checking key2=' . $key2 . ',value2()=' . count($value2) . ',lookFor=' . $lookFor);
 
                                                // "Walk" through all of them
                                                foreach ($value2 as $key3 => $value3) {
 
                                                // "Walk" through all of them
                                                foreach ($value2 as $key3 => $value3) {
@@ -162,12 +162,12 @@ class BaseRegistry extends BaseFrameworkSystem implements Registerable {
                                                        assert(is_array($value3));
 
                                                        // Debug message
                                                        assert(is_array($value3));
 
                                                        // Debug message
-                                                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Checking key=' . $key . ',key3=' . $key3 . ',isset()=' . isset($value3[$key]) . ' ...');
+                                                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Checking key=' . $key . ',key3=' . $key3 . ',isset()=' . isset($value3[$key]) . ' ...');
 
                                                        // Both keys must match!
                                                        if (($key == $key3) || (isset($value3[$key]))) {
                                                                // Debug message
 
                                                        // Both keys must match!
                                                        if (($key == $key3) || (isset($value3[$key]))) {
                                                                // Debug message
-                                                               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Adding ' . $value3[$key] . ' ...');
+                                                               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Adding ' . $value3[$key] . ' ...');
 
                                                                // Then add it
                                                                $entry[$key3] = $value3[$key];
 
                                                                // Then add it
                                                                $entry[$key3] = $value3[$key];
@@ -182,7 +182,7 @@ class BaseRegistry extends BaseFrameworkSystem implements Registerable {
                } // END - foreach
 
                // Debug message
                } // END - foreach
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Returning entry(' . count($entry) . ')=' . print_r($entry, TRUE));
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Returning entry(' . count($entry) . ')=' . print_r($entry, TRUE));
 
                // Return it
                return $entry;
 
                // Return it
                return $entry;
index e78aa7a181656388fb4dbd449e2993b310d3fc16..38b812401698fb26847ad8e5cf5ee38c33e029b6 100644 (file)
@@ -60,7 +60,7 @@ class BaseControllerResolver extends BaseResolver {
                $this->setClassName($this->getCapitalizedClassPrefix() . 'DefaultNewsController');
 
                // Generate the class name
                $this->setClassName($this->getCapitalizedClassPrefix() . 'DefaultNewsController');
 
                // Generate the class name
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BEFORE: controller=' . $controllerName);
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BEFORE: controller=' . $controllerName);
                if ($controllerName != $defaultController) {
                        // Create controller class name
                        $className = $this->getCapitalizedClassPrefix() . self::convertToClassName($controllerName) . 'Controller';
                if ($controllerName != $defaultController) {
                        // Create controller class name
                        $className = $this->getCapitalizedClassPrefix() . self::convertToClassName($controllerName) . 'Controller';
@@ -71,7 +71,7 @@ class BaseControllerResolver extends BaseResolver {
                        // No news at main controller or non-news controller
                        $this->setClassName($this->getCapitalizedClassPrefix() . 'DefaultNewsController');
                }
                        // No news at main controller or non-news controller
                        $this->setClassName($this->getCapitalizedClassPrefix() . 'DefaultNewsController');
                }
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('AFTER: controller=' . $this->getClassName());
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('AFTER: controller=' . $this->getClassName());
 
                // Is this class loaded?
                if (!class_exists($this->getClassName())) {
 
                // Is this class loaded?
                if (!class_exists($this->getClassName())) {
index 6e1e5cf2b32b8ae0c29f6255fa0b23ef39bcafae..d0925c146f2af1e9705d721d02a16b14ebcf21a6 100644 (file)
@@ -198,7 +198,7 @@ class BaseResponse extends BaseFrameworkSystem {
                        // Send all headers
                        foreach ($this->responseHeaders as $name => $value) {
                                header($name . ': ' . $value);
                        // Send all headers
                        foreach ($this->responseHeaders as $name => $value) {
                                header($name . ': ' . $value);
-                               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('name=' . $name . ',value=' . $value);
+                               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('name=' . $name . ',value=' . $value);
                        } // END - foreach
 
                        // Send cookies out?
                        } // END - foreach
 
                        // Send cookies out?
index e51b1b8aed8823005327ccb08360e4c14e6c6942..dd446e6245f2b4af34cbe22f08ada7707a04d7cd 100644 (file)
@@ -66,23 +66,23 @@ class BaseFileStack extends BaseStacker {
         * @todo        To hard assertions here, better rewrite them to exceptions
         */
        public function readFileHeader () {
         * @todo        To hard assertions here, better rewrite them to exceptions
         */
        public function readFileHeader () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
 
                // First rewind to beginning as the header sits at the beginning ...
                $this->getIteratorInstance()->rewind();
 
                // Then read it (see constructor for calculation)
                $data = $this->getIteratorInstance()->read($this->getIteratorInstance()->getHeaderSize());
 
                // First rewind to beginning as the header sits at the beginning ...
                $this->getIteratorInstance()->rewind();
 
                // Then read it (see constructor for calculation)
                $data = $this->getIteratorInstance()->read($this->getIteratorInstance()->getHeaderSize());
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Read %d bytes (%d wanted).', __METHOD__, __LINE__, strlen($data), $this->getIteratorInstance()->getHeaderSize()));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Read %d bytes (%d wanted).', __METHOD__, __LINE__, strlen($data), $this->getIteratorInstance()->getHeaderSize()));
 
                // Have all requested bytes been read?
                assert(strlen($data) == $this->getIteratorInstance()->getHeaderSize());
 
                // Have all requested bytes been read?
                assert(strlen($data) == $this->getIteratorInstance()->getHeaderSize());
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
 
                // Last character must be the separator
 
                // Last character must be the separator
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] data(-1)=%s', __METHOD__, __LINE__, dechex(ord(substr($data, -1, 1)))));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] data(-1)=%s', __METHOD__, __LINE__, dechex(ord(substr($data, -1, 1)))));
                assert(substr($data, -1, 1) == chr(BaseBinaryFile::SEPARATOR_HEADER_ENTRIES));
                assert(substr($data, -1, 1) == chr(BaseBinaryFile::SEPARATOR_HEADER_ENTRIES));
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
 
                // Okay, then remove it
                $data = substr($data, 0, -1);
 
                // Okay, then remove it
                $data = substr($data, 0, -1);
@@ -103,25 +103,25 @@ class BaseFileStack extends BaseStacker {
                $this->getIteratorInstance()->setHeader($header);
 
                // Check if the array has only 3 elements
                $this->getIteratorInstance()->setHeader($header);
 
                // Check if the array has only 3 elements
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] header(%d)=%s', __METHOD__, __LINE__, count($header), print_r($header, TRUE)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] header(%d)=%s', __METHOD__, __LINE__, count($header), print_r($header, TRUE)));
                assert(count($header) == 3);
                assert(count($header) == 3);
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
 
                // Check magic
                assert($header[0] == self::STACK_MAGIC);
 
                // Check magic
                assert($header[0] == self::STACK_MAGIC);
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
 
                // Check length of count and seek position
                assert(strlen($header[1]) == BaseBinaryFile::LENGTH_COUNT);
 
                // Check length of count and seek position
                assert(strlen($header[1]) == BaseBinaryFile::LENGTH_COUNT);
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
                assert(strlen($header[2]) == BaseBinaryFile::LENGTH_POSITION);
                assert(strlen($header[2]) == BaseBinaryFile::LENGTH_POSITION);
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
 
                // Decode count and seek position
                $header[1] = hex2bin($header[1]);
                $header[2] = hex2bin($header[2]);
 
 
                // Decode count and seek position
                $header[1] = hex2bin($header[1]);
                $header[2] = hex2bin($header[2]);
 
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
        }
 
        /**
        }
 
        /**
@@ -130,7 +130,7 @@ class BaseFileStack extends BaseStacker {
         * @return      void
         */
        public function flushFileHeader () {
         * @return      void
         */
        public function flushFileHeader () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
 
                // Put all informations together
                $header = sprintf('%s%s%s%s%s%s',
 
                // Put all informations together
                $header = sprintf('%s%s%s%s%s%s',
@@ -156,7 +156,7 @@ class BaseFileStack extends BaseStacker {
                // Write it to disk (header is always at seek position 0)
                $this->getIteratorInstance()->writeData(0, $header, FALSE);
 
                // Write it to disk (header is always at seek position 0)
                $this->getIteratorInstance()->writeData(0, $header, FALSE);
 
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
        }
 
        /**
        }
 
        /**
@@ -234,7 +234,7 @@ class BaseFileStack extends BaseStacker {
                } // END - if
 
                // Debug message
                } // END - if
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] stackerName=' . $stackerName . ',value[' . gettype($value) . ']=' . print_r($value, TRUE));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] stackerName=' . $stackerName . ',value[' . gettype($value) . ']=' . print_r($value, TRUE));
 
                // No objects/resources are allowed as their serialization takes to long
                assert(!is_object($value));
 
                // No objects/resources are allowed as their serialization takes to long
                assert(!is_object($value));
@@ -530,7 +530,7 @@ class BaseFileStack extends BaseStacker {
         * @throws      UnsupportedOperationException   This method is not (and maybe never will be) supported
         */
        public function writeData ($seekPosition, $data, $flushHeader = TRUE) {
         * @throws      UnsupportedOperationException   This method is not (and maybe never will be) supported
         */
        public function writeData ($seekPosition, $data, $flushHeader = TRUE) {
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] seekPosition=%s,data[]=%s,flushHeader=%d', __METHOD__, __LINE__, $seekPosition, gettype($data), intval($flushHeader)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] seekPosition=%s,data[]=%s,flushHeader=%d', __METHOD__, __LINE__, $seekPosition, gettype($data), intval($flushHeader)));
                throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getPointerInstance()), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getPointerInstance()), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
@@ -543,7 +543,7 @@ class BaseFileStack extends BaseStacker {
         * @throws      UnsupportedOperationException   This method is not (and maybe never will be) supported
         */
        public function writeValueToFile ($groupId, $value) {
         * @throws      UnsupportedOperationException   This method is not (and maybe never will be) supported
         */
        public function writeValueToFile ($groupId, $value) {
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] groupId=%s,value[%s]=%s', __METHOD__, __LINE__, $groupId, gettype($value), print_r($value, TRUE)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] groupId=%s,value[%s]=%s', __METHOD__, __LINE__, $groupId, gettype($value), print_r($value, TRUE)));
                throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getPointerInstance()), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getPointerInstance()), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
@@ -556,7 +556,7 @@ class BaseFileStack extends BaseStacker {
         * @throws      UnsupportedOperationException   This method is not (and maybe never will be) supported
         */
        public function searchNextGap ($length) {
         * @throws      UnsupportedOperationException   This method is not (and maybe never will be) supported
         */
        public function searchNextGap ($length) {
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] length=%s', __METHOD__, __LINE__, $length));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] length=%s', __METHOD__, __LINE__, $length));
                throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getPointerInstance()), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getPointerInstance()), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
@@ -580,7 +580,7 @@ class BaseFileStack extends BaseStacker {
         */
        public function writeDataToFreeGap ($groupId, $hash, $encoded) {
                // Debug message
         */
        public function writeDataToFreeGap ($groupId, $hash, $encoded) {
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,encoded()=%d - CALLED!', __METHOD__, __LINE__, $groupId, $hash, strlen($encoded)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,encoded()=%d - CALLED!', __METHOD__, __LINE__, $groupId, $hash, strlen($encoded)));
 
                // Raw data been written to the file
                $rawData = sprintf('%s%s%s%s%s',
 
                // Raw data been written to the file
                $rawData = sprintf('%s%s%s%s%s',
@@ -592,7 +592,7 @@ class BaseFileStack extends BaseStacker {
                );
 
                // Debug message
                );
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,rawData()=%d', __METHOD__, __LINE__, $groupId, $hash, strlen($rawData)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,rawData()=%d', __METHOD__, __LINE__, $groupId, $hash, strlen($rawData)));
 
                // Search for next free gap
                $gapPosition = $this->getIteratorInstance()->searchNextGap(strlen($rawData));
 
                // Search for next free gap
                $gapPosition = $this->getIteratorInstance()->searchNextGap(strlen($rawData));
@@ -601,13 +601,13 @@ class BaseFileStack extends BaseStacker {
                assert($gapPosition > $this->getIteratorInstance()->getHeaderSize());
 
                // Debug message
                assert($gapPosition > $this->getIteratorInstance()->getHeaderSize());
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,gapPosition=%s', __METHOD__, __LINE__, $groupId, $hash, $gapPosition));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,gapPosition=%s', __METHOD__, __LINE__, $groupId, $hash, $gapPosition));
 
                // Then write the data at that gap
                $this->getIteratorInstance()->writeData($gapPosition, $rawData);
 
                // Debug message
 
                // Then write the data at that gap
                $this->getIteratorInstance()->writeData($gapPosition, $rawData);
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,rawData()=%d - EXIT!', __METHOD__, __LINE__, $groupId, $hash, strlen($rawData)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,rawData()=%d - EXIT!', __METHOD__, __LINE__, $groupId, $hash, strlen($rawData)));
 
                // Return gap position, hash and length of raw data
                return array(
 
                // Return gap position, hash and length of raw data
                return array(
index 2535f812ae8ec9c5d556615b4d701f8ae92409cc..f614d0d32f175b348c21733d06ff0d65c90939b4 100644 (file)
@@ -67,7 +67,7 @@ class McryptStream extends BaseStream implements EncryptableStream {
         */
        public function encryptStream ($str, $key = NULL) {
                // Debug message
         */
        public function encryptStream ($str, $key = NULL) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: key[' . gettype($key) . ']=' . $key);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: key[' . gettype($key) . ']=' . $key);
 
                // Init crypto module
                $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
 
                // Init crypto module
                $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
@@ -170,7 +170,7 @@ class McryptStream extends BaseStream implements EncryptableStream {
         * @throws      UnsupportedOperationException   If this method is called (which is a mistake)
         */
        public function streamData ($data) {
         * @throws      UnsupportedOperationException   If this method is called (which is a mistake)
         */
        public function streamData ($data) {
-               self::createDebugInstance(__CLASS__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
index a2f33c2cf305747f6a0810272ed08fca6c5a92ef..9f26c9c35ad1fcb1a4c907656d830658c6c44f32 100644 (file)
@@ -86,7 +86,7 @@ class NullCryptoStream extends BaseStream implements EncryptableStream {
         * @throws      UnsupportedOperationException   If this method is called (which is a mistake)
         */
        public function streamData ($data) {
         * @throws      UnsupportedOperationException   If this method is called (which is a mistake)
         */
        public function streamData ($data) {
-               self::createDebugInstance(__CLASS__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
index 186cbf0ce132fe454867dc4b07012ff4f187b336..a8bba3544ff03ede4835cb1bb03953d0ae9ee927 100644 (file)
@@ -84,7 +84,7 @@ class IdleLoopTask extends BaseTask implements Taskable, Visitable {
         */
        public function doShutdown () {
                // Debug message
         */
        public function doShutdown () {
                // Debug message
-               self::createDebugInstance(__CLASS__)->debugOutput('TASK[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down...');
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down...');
        }
 
 }
        }
 
 }
index d507052ac5360ea30d5c644296510349fc6dcdfa..a20fa8c6c4e74586257fec7e995b120f06958849 100644 (file)
@@ -194,7 +194,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                // If the stack is NULL, use the current group
                if (is_null($variableGroup)) {
                        // Use current group
                // If the stack is NULL, use the current group
                if (is_null($variableGroup)) {
                        // Use current group
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__.' currGroup=' . $this->currGroup . ' set as stack!');
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(__METHOD__.' currGroup=' . $this->currGroup . ' set as stack!');
                        $variableGroup = $this->currGroup;
                } // END - if
 
                        $variableGroup = $this->currGroup;
                } // END - if
 
@@ -202,11 +202,11 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                if ($this->isVarStackSet($variableGroup)) {
                        // Now search for it
                        foreach ($this->getVarStack($variableGroup) as $index => $currEntry) {
                if ($this->isVarStackSet($variableGroup)) {
                        // Now search for it
                        foreach ($this->getVarStack($variableGroup) as $index => $currEntry) {
-                               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__.':currGroup=' . $variableGroup . ',idx=' . $index . ',currEntry=' . $currEntry['name'] . ',variableName=' . $variableName);
+                               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(__METHOD__.':currGroup=' . $variableGroup . ',idx=' . $index . ',currEntry=' . $currEntry['name'] . ',variableName=' . $variableName);
                                // Is the entry found?
                                if ($currEntry['name'] == $variableName) {
                                        // Found!
                                // Is the entry found?
                                if ($currEntry['name'] == $variableName) {
                                        // Found!
-                                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__.':FOUND!');
+                                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(__METHOD__.':FOUND!');
                                        $found = $index;
                                        break;
                                } // END - if
                                        $found = $index;
                                        break;
                                } // END - if
@@ -269,7 +269,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                // If the stack is NULL, use the current group
                if (is_null($variableGroup)) {
                        // Use current group
                // If the stack is NULL, use the current group
                if (is_null($variableGroup)) {
                        // Use current group
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__.' currGroup=' . $this->currGroup . ' set as stack!');
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(__METHOD__.' currGroup=' . $this->currGroup . ' set as stack!');
                        $variableGroup = $this->currGroup;
                } // END - if
 
                        $variableGroup = $this->currGroup;
                } // END - if
 
@@ -283,7 +283,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                } // END - if
 
                // Return the current position
                } // END - if
 
                // Return the current position
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__.': variableGroup=' . $variableGroup . ',variableName=' . $variableName . ', content[' . gettype($content) . ']=' . $content);
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(__METHOD__.': variableGroup=' . $variableGroup . ',variableName=' . $variableName . ', content[' . gettype($content) . ']=' . $content);
                return $content;
        }
 
                return $content;
        }
 
@@ -330,7 +330,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        public function setVariableGroup ($groupName, $add = TRUE) {
                // Set group name
         */
        public function setVariableGroup ($groupName, $add = TRUE) {
                // Set group name
-               //* DEBIG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__.': currGroup=' . $groupName);
+               //* DEBIG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(__METHOD__.': currGroup=' . $groupName);
                $this->currGroup = $groupName;
 
                // Skip group 'general'
                $this->currGroup = $groupName;
 
                // Skip group 'general'
@@ -352,7 +352,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                $variableName = trim(self::convertDashesToUnderscores($variableName));
 
                // Debug message
                $variableName = trim(self::convertDashesToUnderscores($variableName));
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__.': group=' . $this->currGroup . ', variableName=' . $variableName . ', value=' . $value);
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(__METHOD__.': group=' . $this->currGroup . ', variableName=' . $variableName . ', value=' . $value);
 
                // Get current variables in group
                $currVars = $this->readCurrentGroup();
 
                // Get current variables in group
                $currVars = $this->readCurrentGroup();
@@ -628,8 +628,8 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        protected final function setRawTemplateData ($rawTemplateData) {
                // And store it in this class
         */
        protected final function setRawTemplateData ($rawTemplateData) {
                // And store it in this class
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__.': ' . strlen($rawTemplateData) . ' Bytes set.');
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__.': ' . $this->currGroup . ' variables: ' . count($this->getVarStack($this->currGroup)) . ', groups=' . count($this->varStack));
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(__METHOD__.': ' . strlen($rawTemplateData) . ' Bytes set.');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(__METHOD__.': ' . $this->currGroup . ' variables: ' . count($this->getVarStack($this->currGroup)) . ', groups=' . count($this->varStack));
                $this->rawTemplateData = (string) $rawTemplateData;
        }
 
                $this->rawTemplateData = (string) $rawTemplateData;
        }
 
@@ -639,7 +639,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         * @return      $rawTemplateData        The raw data from the template
         */
        public final function getRawTemplateData () {
         * @return      $rawTemplateData        The raw data from the template
         */
        public final function getRawTemplateData () {
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: ' . strlen($this->rawTemplateData) . ' Bytes read.');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: ' . strlen($this->rawTemplateData) . ' Bytes read.');
                return $this->rawTemplateData;
        }
 
                return $this->rawTemplateData;
        }
 
@@ -650,7 +650,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        private final function setCompiledData ($compiledData) {
                // And store it in this class
         */
        private final function setCompiledData ($compiledData) {
                // And store it in this class
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: ' . strlen($compiledData) . ' Bytes set.');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: ' . strlen($compiledData) . ' Bytes set.');
                $this->compiledData = (string) $compiledData;
        }
 
                $this->compiledData = (string) $compiledData;
        }
 
@@ -660,7 +660,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         * @return      $compiledData   Compiled template data
         */
        public final function getCompiledData () {
         * @return      $compiledData   Compiled template data
         */
        public final function getCompiledData () {
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: ' . strlen($this->compiledData) . ' Bytes read.');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: ' . strlen($this->compiledData) . ' Bytes read.');
                return $this->compiledData;
        }
 
                return $this->compiledData;
        }
 
@@ -724,7 +724,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        private function loadRawTemplateData ($fqfn) {
                // Some debug code to look on the file which is being loaded
         */
        private function loadRawTemplateData ($fqfn) {
                // Some debug code to look on the file which is being loaded
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: FQFN=' . $fqfn);
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: FQFN=' . $fqfn);
 
                // Load the raw template
                $rawTemplateData = $this->getFileIoInstance()->loadFileContents($fqfn);
 
                // Load the raw template
                $rawTemplateData = $this->getFileIoInstance()->loadFileContents($fqfn);
@@ -750,7 +750,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                $variableName = trim(self::convertDashesToUnderscores($variableName));
 
                // Debug message
                $variableName = trim(self::convertDashesToUnderscores($variableName));
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: variableName=' . $variableName . ',variableName=' . $variableName);
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: variableName=' . $variableName . ',variableName=' . $variableName);
 
                // Is it not a config variable?
                if ($variableName != 'config') {
 
                // Is it not a config variable?
                if ($variableName != 'config') {
@@ -776,7 +776,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                preg_match_all('/\$(\w+)(\[(\w+)\])?/', $rawData, $variableMatches);
 
                // Debug message
                preg_match_all('/\$(\w+)(\[(\w+)\])?/', $rawData, $variableMatches);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:rawData(' . strlen($rawData) . ')=' . $rawData . ',variableMatches=' . print_r($variableMatches, TRUE));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:rawData(' . strlen($rawData) . ')=' . $rawData . ',variableMatches=' . print_r($variableMatches, TRUE));
 
                // Did we find some variables?
                if ((is_array($variableMatches)) && (count($variableMatches) == 4) && (count($variableMatches[0]) > 0)) {
 
                // Did we find some variables?
                if ((is_array($variableMatches)) && (count($variableMatches) == 4) && (count($variableMatches[0]) > 0)) {
@@ -825,7 +825,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                        // RECURSIVE PROTECTION! BE CAREFUL HERE!
                        if ((!isset($this->loadedRawData[$template])) && (!in_array($template, $this->loadedTemplates))) {
                                // Debug message
                        // RECURSIVE PROTECTION! BE CAREFUL HERE!
                        if ((!isset($this->loadedRawData[$template])) && (!in_array($template, $this->loadedTemplates))) {
                                // Debug message
-                               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:template=' . $template);
+                               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:template=' . $template);
 
                                // Template not found, but maybe variable assigned?
                                if ($this->getVariableIndex($template) !== FALSE) {
 
                                // Template not found, but maybe variable assigned?
                                if ($this->getVariableIndex($template) !== FALSE) {
@@ -960,7 +960,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        private function assignAllVariables (array $varMatches) {
                // Debug message
         */
        private function assignAllVariables (array $varMatches) {
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:varMatches()=' . count($varMatches));
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:varMatches()=' . count($varMatches));
 
                // Search for all variables
                foreach ($varMatches[1] as $key => $var) {
 
                // Search for all variables
                foreach ($varMatches[1] as $key => $var) {
@@ -968,7 +968,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                        $var = trim(self::convertDashesToUnderscores($var));
 
                        // Debug message
                        $var = trim(self::convertDashesToUnderscores($var));
 
                        // Debug message
-                       self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:key=' . $key . ',var=' . $var);
+                       self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:key=' . $key . ',var=' . $var);
 
                        // Detect leading equals
                        if (substr($varMatches[2][$key], 0, 1) == '=') {
 
                        // Detect leading equals
                        if (substr($varMatches[2][$key], 0, 1) == '=') {
@@ -995,19 +995,19 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        private function compileRawTemplateData (array $templateMatches) {
                // Debug message
         */
        private function compileRawTemplateData (array $templateMatches) {
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:loadedRawData()= ' .count($this->loadedRawData));
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:loadedRawData()= ' .count($this->loadedRawData));
 
                // Are some code-templates found which we need to compile?
                if (count($this->loadedRawData) > 0) {
                        // Then compile all!
                        foreach ($this->loadedRawData as $template => $code) {
                                // Debug message
 
                // Are some code-templates found which we need to compile?
                if (count($this->loadedRawData) > 0) {
                        // Then compile all!
                        foreach ($this->loadedRawData as $template => $code) {
                                // Debug message
-                               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:template=' . $template . ',code(' . strlen($code) . ')=' . $code);
+                               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:template=' . $template . ',code(' . strlen($code) . ')=' . $code);
 
                                // Is this template already compiled?
                                if (in_array($template, $this->compiledTemplates)) {
                                        // Then skip it
 
                                // Is this template already compiled?
                                if (in_array($template, $this->compiledTemplates)) {
                                        // Then skip it
-                                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: Template ' . $template . ' already compiled. SKIPPED!');
+                                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: Template ' . $template . ' already compiled. SKIPPED!');
                                        continue;
                                } // END - if
 
                                        continue;
                                } // END - if
 
@@ -1018,7 +1018,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                                if (($foundIndex !== FALSE) && (isset($templateMatches[3][$foundIndex]))) {
                                        // Split it up with another reg. exp. into variable=value pairs
                                        preg_match_all($this->regExpVarValue, $templateMatches[3][$foundIndex], $varMatches);
                                if (($foundIndex !== FALSE) && (isset($templateMatches[3][$foundIndex]))) {
                                        // Split it up with another reg. exp. into variable=value pairs
                                        preg_match_all($this->regExpVarValue, $templateMatches[3][$foundIndex], $varMatches);
-                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:varMatches=' . print_r($varMatches, TRUE));
+                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:varMatches=' . print_r($varMatches, TRUE));
 
                                        // Assign all variables
                                        $this->assignAllVariables($varMatches);
 
                                        // Assign all variables
                                        $this->assignAllVariables($varMatches);
@@ -1054,7 +1054,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
        private function finalizeVariableCompilation () {
                // Get the content
                $content = $this->getRawTemplateData();
        private function finalizeVariableCompilation () {
                // Get the content
                $content = $this->getRawTemplateData();
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: content before=' . strlen($content) . ' (' . md5($content) . ')');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: content before=' . strlen($content) . ' (' . md5($content) . ')');
 
                // Do we have the stack?
                if (!$this->isVarStackSet('general')) {
 
                // Do we have the stack?
                if (!$this->isVarStackSet('general')) {
@@ -1065,7 +1065,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
 
                // Walk through all variables
                foreach ($this->getVarStack('general') as $currEntry) {
 
                // Walk through all variables
                foreach ($this->getVarStack('general') as $currEntry) {
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: name=' . $currEntry['name'] . ', value=<pre>' . htmlentities($currEntry['value']) . '</pre>');
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: name=' . $currEntry['name'] . ', value=<pre>' . htmlentities($currEntry['value']) . '</pre>');
                        // Replace all [$var] or {?$var?} with the content
                        // @TODO Old behaviour, will become obsolete!
                        $content = str_replace('$content[' . $currEntry['name'] . ']', $currEntry['value'], $content);
                        // Replace all [$var] or {?$var?} with the content
                        // @TODO Old behaviour, will become obsolete!
                        $content = str_replace('$content[' . $currEntry['name'] . ']', $currEntry['value'], $content);
@@ -1077,7 +1077,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                        $content = str_replace('{?' . $currEntry['name'] . '?}', $currEntry['value'], $content);
                } // END - for
 
                        $content = str_replace('{?' . $currEntry['name'] . '?}', $currEntry['value'], $content);
                } // END - for
 
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: content after=' . strlen($content) . ' (' . md5($content) . ')');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: content after=' . strlen($content) . ' (' . md5($content) . ')');
 
                // Set the content back
                $this->setRawTemplateData($content);
 
                // Set the content back
                $this->setRawTemplateData($content);
@@ -1122,11 +1122,11 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                // Was it found?
                if ($index === FALSE) {
                        // Add it to the stack
                // Was it found?
                if ($index === FALSE) {
                        // Add it to the stack
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:ADD: ' . $variableName . '[' . gettype($value) . ']=' . $value);
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:ADD: ' . $variableName . '[' . gettype($value) . ']=' . $value);
                        $this->addVariable($variableName, $value);
                } elseif (!empty($value)) {
                        // Modify the stack entry
                        $this->addVariable($variableName, $value);
                } elseif (!empty($value)) {
                        // Modify the stack entry
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:MOD: ' . $variableName . '[' . gettype($value) . ']=' . $value);
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:MOD: ' . $variableName . '[' . gettype($value) . ']=' . $value);
                        $this->modifyVariable($variableName, $value);
                }
        }
                        $this->modifyVariable($variableName, $value);
                }
        }
@@ -1145,7 +1145,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                // Was it found?
                if ($index !== FALSE) {
                        // Remove this variable
                // Was it found?
                if ($index !== FALSE) {
                        // Remove this variable
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:UNSET: variableGroup=' . $variableGroup . ',variableName=' . $variableName . ',index=' . $index);
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:UNSET: variableGroup=' . $variableGroup . ',variableName=' . $variableName . ',index=' . $index);
                        $this->unsetVariableStackOffset($index, $variableGroup);
                } // END - if
        }
                        $this->unsetVariableStackOffset($index, $variableGroup);
                } // END - if
        }
@@ -1179,7 +1179,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                $variableName = trim(self::convertDashesToUnderscores($variableName));
 
                // Sweet and simple...
                $variableName = trim(self::convertDashesToUnderscores($variableName));
 
                // Sweet and simple...
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: variableName=' . $variableName . ',getConfigEntry()=' . $this->getConfigInstance()->getConfigEntry($variableName));
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: variableName=' . $variableName . ',getConfigEntry()=' . $this->getConfigInstance()->getConfigEntry($variableName));
                $this->assignVariable($variableName, $this->getConfigInstance()->getConfigEntry($variableName));
        }
 
                $this->assignVariable($variableName, $this->getConfigInstance()->getConfigEntry($variableName));
        }
 
@@ -1262,7 +1262,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                // Do we have the stack?
                if (!$this->isVarStackSet('general')) {
                        // Abort here silently
                // Do we have the stack?
                if (!$this->isVarStackSet('general')) {
                        // Abort here silently
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: Aborted, variable stack general not found!');
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: Aborted, variable stack general not found!');
                        return;
                } // END - if
 
                        return;
                } // END - if
 
@@ -1272,11 +1272,11 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                        $value = $this->compileRawCode($this->readVariable($currVariable['name']), TRUE);
 
                        // Debug message
                        $value = $this->compileRawCode($this->readVariable($currVariable['name']), TRUE);
 
                        // Debug message
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: name=' . $currVariable['name'] . ',value=' . $value);
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: name=' . $currVariable['name'] . ',value=' . $value);
 
                        // Remove it from stack
                        $this->removeVariable($currVariable['name'], 'general');
 
                        // Remove it from stack
                        $this->removeVariable($currVariable['name'], 'general');
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: value='. $value . ',name=' . $currVariable['name'] . ',index=' . $index);
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: value='. $value . ',name=' . $currVariable['name'] . ',index=' . $index);
 
                        // Is it a configuration key?
                        if ($this->getConfigInstance()->isConfigurationEntrySet($value)) {
 
                        // Is it a configuration key?
                        if ($this->getConfigInstance()->isConfigurationEntrySet($value)) {
@@ -1303,7 +1303,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                // Iterate through all general variables
                foreach ($this->getVarStack('general') as $currVariable) {
                        // Transfer it's name/value combination to the $content array
                // Iterate through all general variables
                foreach ($this->getVarStack('general') as $currVariable) {
                        // Transfer it's name/value combination to the $content array
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:' . $currVariable['name'] . '=<pre>' . htmlentities($currVariable['value']).'</pre>');
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:' . $currVariable['name'] . '=<pre>' . htmlentities($currVariable['value']).'</pre>');
                        $dummy[$currVariable['name']] = $currVariable['value'];
                }// END - if
 
                        $dummy[$currVariable['name']] = $currVariable['value'];
                }// END - if
 
@@ -1360,7 +1360,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                        // Goes something wrong?
                        if ((!isset($result)) || (empty($result))) {
                                // Output eval command
                        // Goes something wrong?
                        if ((!isset($result)) || (empty($result))) {
                                // Output eval command
-                               self::createDebugInstance(__CLASS__)->debugOutput(sprintf('Failed eval() code: <pre>%s</pre>', $this->markupCode($eval, TRUE)), TRUE);
+                               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('Failed eval() code: <pre>%s</pre>', $this->markupCode($eval, TRUE)), TRUE);
 
                                // Output backtrace here
                                $this->debugBackTrace();
 
                                // Output backtrace here
                                $this->debugBackTrace();
@@ -1410,7 +1410,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                preg_match_all($this->regExpCodeTags, $rawData, $templateMatches);
 
                // Debug message
                preg_match_all($this->regExpCodeTags, $rawData, $templateMatches);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:templateMatches=' . print_r($templateMatches , TRUE));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:templateMatches=' . print_r($templateMatches , TRUE));
 
                // Analyze the matches array
                if ((is_array($templateMatches)) && (count($templateMatches) == 4) && (count($templateMatches[0]) > 0)) {
 
                // Analyze the matches array
                if ((is_array($templateMatches)) && (count($templateMatches) == 4) && (count($templateMatches[0]) > 0)) {
@@ -1476,22 +1476,22 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        public function compileRawCode ($rawCode, $setMatchAsCode=FALSE) {
                // Find the variables
         */
        public function compileRawCode ($rawCode, $setMatchAsCode=FALSE) {
                // Find the variables
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:rawCode=<pre>' . htmlentities($rawCode) . '</pre>');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:rawCode=<pre>' . htmlentities($rawCode) . '</pre>');
                preg_match_all($this->regExpVarValue, $rawCode, $varMatches);
 
                // Compile all variables
                preg_match_all($this->regExpVarValue, $rawCode, $varMatches);
 
                // Compile all variables
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:<pre>' . print_r($varMatches, TRUE) . '</pre>');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:<pre>' . print_r($varMatches, TRUE) . '</pre>');
                foreach ($varMatches[0] as $match) {
                        // Add variable tags around it
                        $varCode = '{?' . $match . '?}';
 
                        // Debug message
                foreach ($varMatches[0] as $match) {
                        // Add variable tags around it
                        $varCode = '{?' . $match . '?}';
 
                        // Debug message
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:varCode=' . $varCode);
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:varCode=' . $varCode);
 
                        // Is the variable found in code? (safes some calls)
                        if (strpos($rawCode, $varCode) !== FALSE) {
                                // Debug message
 
                        // Is the variable found in code? (safes some calls)
                        if (strpos($rawCode, $varCode) !== FALSE) {
                                // Debug message
-                               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: match=' . $match . ',rawCode[' . gettype($rawCode) . ']=' . $rawCode);
+                               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: match=' . $match . ',rawCode[' . gettype($rawCode) . ']=' . $rawCode);
 
                                // Use $match as new value or $value from read variable?
                                if ($setMatchAsCode === TRUE) {
 
                                // Use $match as new value or $value from read variable?
                                if ($setMatchAsCode === TRUE) {
@@ -1508,7 +1508,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                } // END - foreach
 
                // Return the compiled data
                } // END - foreach
 
                // Return the compiled data
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:rawCode=<pre>' . htmlentities($rawCode) . '</pre>');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:rawCode=<pre>' . htmlentities($rawCode) . '</pre>');
                return $rawCode;
        }
 
                return $rawCode;
        }
 
@@ -1529,7 +1529,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         * @return      void
         */
        public function renameVariable ($oldName, $newName) {
         * @return      void
         */
        public function renameVariable ($oldName, $newName) {
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: oldName=' . $oldName . ', newName=' . $newName);
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: oldName=' . $oldName . ', newName=' . $newName);
                // Get raw template code
                $rawData = $this->getRawTemplateData();
 
                // Get raw template code
                $rawData = $this->getRawTemplateData();
 
index 7df391abdb0454ec9d6cf2b4e0f4e49f55255a34..5ef8686a66ed3782e7efae0edd3d1214db71cddf 100644 (file)
@@ -59,9 +59,9 @@ class ActiveTaskVisitor extends BaseVisitor implements TaskVisitor, PoolVisitor,
         */
        public function visitTask (Taskable $taskInstance) {
                // Execute the task from this visitor
         */
        public function visitTask (Taskable $taskInstance) {
                // Execute the task from this visitor
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting task ' . $taskInstance->__toString() . ' - CALLED!');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting task ' . $taskInstance->__toString() . ' - CALLED!');
                $taskInstance->executeTask();
                $taskInstance->executeTask();
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting task ' . $taskInstance->__toString() . ' - EXIT!');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting task ' . $taskInstance->__toString() . ' - EXIT!');
        }
 
        /**
        }
 
        /**
@@ -86,9 +86,9 @@ class ActiveTaskVisitor extends BaseVisitor implements TaskVisitor, PoolVisitor,
         */
        public function visitListener (Listenable $listenerInstance) {
                // Do "listen" here
         */
        public function visitListener (Listenable $listenerInstance) {
                // Do "listen" here
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting ' . $listenerInstance->__toString() . ' - CALLED!');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting ' . $listenerInstance->__toString() . ' - CALLED!');
                $listenerInstance->doListen();
                $listenerInstance->doListen();
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting ' . $listenerInstance->__toString() . ' - FINISH');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting ' . $listenerInstance->__toString() . ' - FINISH');
        }
 
        /**
        }
 
        /**
index 726969a8c2c9ffd7d0612e21957c8e314eede715..fe77ed389591f3677868ffbfe2ae21137f62fe1f 100644 (file)
@@ -70,7 +70,7 @@ class CompressorChannel extends BaseMiddleware implements Registerable {
                        // Read all directories but no sub directories, .htaccess files and NullCompressor class
                        while ($directoryEntry = $directoryInstance->readDirectoryExcept(array('.htaccess', 'class_NullCompressor.php'))) {
                                // Debug message
                        // Read all directories but no sub directories, .htaccess files and NullCompressor class
                        while ($directoryEntry = $directoryInstance->readDirectoryExcept(array('.htaccess', 'class_NullCompressor.php'))) {
                                // Debug message
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('COMPRESSOR[' . __METHOD__ . ':' . __LINE__ . ']: directoryEntry=' . $directoryEntry);
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('COMPRESSOR[' . __METHOD__ . ':' . __LINE__ . ']: directoryEntry=' . $directoryEntry);
 
                                // Is this a class file?
                                if ((substr($directoryEntry, 0, 6) == 'class_') && (substr($directoryEntry, -4, 4) == '.php')) {
 
                                // Is this a class file?
                                if ((substr($directoryEntry, 0, 6) == 'class_') && (substr($directoryEntry, -4, 4) == '.php')) {
index 03712ce50b3ed82ad1a1ecfbee3f73e3a1e2f6e8..fb02a790094226f2eb65e1da53b4506b1e417744 100644 (file)
@@ -217,10 +217,10 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re
                $this->dbLayer->connectToDatabase();
 
                // Call database backend
                $this->dbLayer->connectToDatabase();
 
                // Call database backend
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DB-CONNECTION[' . $this->__toString() . ']: Calling this->dbLayer->removeNonPublicDataFromArray(data) ...');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DB-CONNECTION[' . $this->__toString() . ']: Calling this->dbLayer->removeNonPublicDataFromArray(data) ...');
                $data = $this->dbLayer->removeNonPublicDataFromArray($data);
 
                $data = $this->dbLayer->removeNonPublicDataFromArray($data);
 
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DB-CONNECTION[' . $this->__toString() . ']: data[]=' . gettype($data));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DB-CONNECTION[' . $this->__toString() . ']: data[]=' . gettype($data));
                return $data;
        }
 
                return $data;
        }
 
index 75d0af5e3b74f8b1e0bdf86f412d1679c10a865f..effae7ade95072f635cea33660be3faf1c38c17d 100644 (file)
@@ -133,7 +133,7 @@ class FileIoHandler extends BaseMiddleware implements IoHandler {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function saveFile ($fileName, array $dataArray) {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function saveFile ($fileName, array $dataArray) {
-               self::createDebugInstance(__CLASS__)->debugOutput('fileName=' . $fileName . ',dataArray()=' . count($dataArray));
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('fileName=' . $fileName . ',dataArray()=' . count($dataArray));
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }