]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Fri, 31 Jan 2025 23:08:12 +0000 (00:08 +0100)
committerRoland Häder <roland@mxchange.org>
Fri, 31 Jan 2025 23:12:19 +0000 (00:12 +0100)
- more scalar type-hints
- lesser debugOutput() deprecated) method invocations
- updated composer.lock

14 files changed:
composer.lock
framework/main/classes/auth/class_CookieAuth.php
framework/main/classes/cache/class_MemoryCache.php
framework/main/classes/client/http/class_HttpClient.php
framework/main/classes/filter/class_FilterChain.php
framework/main/classes/index/file/class_BaseFileIndex.php
framework/main/classes/index/file/stack/class_FileStackIndex.php
framework/main/classes/iterator/file/class_FileIterator.php
framework/main/classes/parser/xml/class_XmlParser.php
framework/main/classes/streams/crypto/null/class_NullCryptoStream.php
framework/main/classes/streams/crypto/openssl/class_OpenSslStream.php
framework/main/classes/template/class_BaseTemplateEngine.php
framework/main/interfaces/auth/class_Authorizeable.php
framework/main/interfaces/cache/class_Cacheable.php

index e2ea515b25e3facd496ed4b4123ee65a6fd45e77..49adea96b0fffeaf5e387c8ed56270f340a2ef14 100644 (file)
         },
         {
             "name": "nikic/php-parser",
-            "version": "v5.3.1",
+            "version": "v5.4.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/nikic/PHP-Parser.git",
-                "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b"
+                "reference": "447a020a1f875a434d62f2a401f53b82a396e494"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b",
-                "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b",
+                "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494",
+                "reference": "447a020a1f875a434d62f2a401f53b82a396e494",
                 "shasum": ""
             },
             "require": {
             ],
             "support": {
                 "issues": "https://github.com/nikic/PHP-Parser/issues",
-                "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1"
+                "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0"
             },
-            "time": "2024-10-08T18:51:32+00:00"
+            "time": "2024-12-30T11:07:19+00:00"
         },
         {
             "name": "phar-io/manifest",
         },
         {
             "name": "phpunit/php-code-coverage",
-            "version": "11.0.7",
+            "version": "11.0.8",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
-                "reference": "f7f08030e8811582cc459871d28d6f5a1a4d35ca"
+                "reference": "418c59fd080954f8c4aa5631d9502ecda2387118"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f7f08030e8811582cc459871d28d6f5a1a4d35ca",
-                "reference": "f7f08030e8811582cc459871d28d6f5a1a4d35ca",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/418c59fd080954f8c4aa5631d9502ecda2387118",
+                "reference": "418c59fd080954f8c4aa5631d9502ecda2387118",
                 "shasum": ""
             },
             "require": {
                 "theseer/tokenizer": "^1.2.3"
             },
             "require-dev": {
-                "phpunit/phpunit": "^11.4.1"
+                "phpunit/phpunit": "^11.5.0"
             },
             "suggest": {
                 "ext-pcov": "PHP extension that provides line coverage",
             "support": {
                 "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
                 "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
-                "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.7"
+                "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.8"
             },
             "funding": [
                 {
                     "type": "github"
                 }
             ],
-            "time": "2024-10-09T06:21:38+00:00"
+            "time": "2024-12-11T12:34:27+00:00"
         },
         {
             "name": "phpunit/php-file-iterator",
         },
         {
             "name": "phpunit/phpunit",
-            "version": "11.4.3",
+            "version": "11.5.6",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
-                "reference": "e8e8ed1854de5d36c088ec1833beae40d2dedd76"
+                "reference": "3c3ae14c90f244cdda95028c3e469028e8d1c02c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e8e8ed1854de5d36c088ec1833beae40d2dedd76",
-                "reference": "e8e8ed1854de5d36c088ec1833beae40d2dedd76",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3c3ae14c90f244cdda95028c3e469028e8d1c02c",
+                "reference": "3c3ae14c90f244cdda95028c3e469028e8d1c02c",
                 "shasum": ""
             },
             "require": {
                 "ext-mbstring": "*",
                 "ext-xml": "*",
                 "ext-xmlwriter": "*",
-                "myclabs/deep-copy": "^1.12.0",
+                "myclabs/deep-copy": "^1.12.1",
                 "phar-io/manifest": "^2.0.4",
                 "phar-io/version": "^3.2.1",
                 "php": ">=8.2",
-                "phpunit/php-code-coverage": "^11.0.7",
+                "phpunit/php-code-coverage": "^11.0.8",
                 "phpunit/php-file-iterator": "^5.1.0",
                 "phpunit/php-invoker": "^5.0.1",
                 "phpunit/php-text-template": "^4.0.1",
                 "phpunit/php-timer": "^7.0.1",
                 "sebastian/cli-parser": "^3.0.2",
-                "sebastian/code-unit": "^3.0.1",
-                "sebastian/comparator": "^6.1.1",
+                "sebastian/code-unit": "^3.0.2",
+                "sebastian/comparator": "^6.3.0",
                 "sebastian/diff": "^6.0.2",
                 "sebastian/environment": "^7.2.0",
-                "sebastian/exporter": "^6.1.3",
+                "sebastian/exporter": "^6.3.0",
                 "sebastian/global-state": "^7.0.2",
                 "sebastian/object-enumerator": "^6.0.1",
                 "sebastian/type": "^5.1.0",
-                "sebastian/version": "^5.0.2"
+                "sebastian/version": "^5.0.2",
+                "staabm/side-effects-detector": "^1.0.5"
             },
             "suggest": {
                 "ext-soap": "To be able to generate mocks based on WSDL files"
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-main": "11.4-dev"
+                    "dev-main": "11.5-dev"
                 }
             },
             "autoload": {
             "support": {
                 "issues": "https://github.com/sebastianbergmann/phpunit/issues",
                 "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
-                "source": "https://github.com/sebastianbergmann/phpunit/tree/11.4.3"
+                "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.6"
             },
             "funding": [
                 {
                     "type": "tidelift"
                 }
             ],
-            "time": "2024-10-28T13:07:50+00:00"
+            "time": "2025-01-31T07:03:30+00:00"
         },
         {
             "name": "sebastian/cli-parser",
         },
         {
             "name": "sebastian/code-unit",
-            "version": "3.0.1",
+            "version": "3.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/code-unit.git",
-                "reference": "6bb7d09d6623567178cf54126afa9c2310114268"
+                "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/6bb7d09d6623567178cf54126afa9c2310114268",
-                "reference": "6bb7d09d6623567178cf54126afa9c2310114268",
+                "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca",
+                "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca",
                 "shasum": ""
             },
             "require": {
                 "php": ">=8.2"
             },
             "require-dev": {
-                "phpunit/phpunit": "^11.0"
+                "phpunit/phpunit": "^11.5"
             },
             "type": "library",
             "extra": {
             "support": {
                 "issues": "https://github.com/sebastianbergmann/code-unit/issues",
                 "security": "https://github.com/sebastianbergmann/code-unit/security/policy",
-                "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.1"
+                "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.2"
             },
             "funding": [
                 {
                     "type": "github"
                 }
             ],
-            "time": "2024-07-03T04:44:28+00:00"
+            "time": "2024-12-12T09:59:06+00:00"
         },
         {
             "name": "sebastian/code-unit-reverse-lookup",
         },
         {
             "name": "sebastian/comparator",
-            "version": "6.2.1",
+            "version": "6.3.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/comparator.git",
-                "reference": "43d129d6a0f81c78bee378b46688293eb7ea3739"
+                "reference": "d4e47a769525c4dd38cea90e5dcd435ddbbc7115"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/43d129d6a0f81c78bee378b46688293eb7ea3739",
-                "reference": "43d129d6a0f81c78bee378b46688293eb7ea3739",
+                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/d4e47a769525c4dd38cea90e5dcd435ddbbc7115",
+                "reference": "d4e47a769525c4dd38cea90e5dcd435ddbbc7115",
                 "shasum": ""
             },
             "require": {
             "require-dev": {
                 "phpunit/phpunit": "^11.4"
             },
+            "suggest": {
+                "ext-bcmath": "For comparing BcMath\\Number objects"
+            },
             "type": "library",
             "extra": {
                 "branch-alias": {
             "support": {
                 "issues": "https://github.com/sebastianbergmann/comparator/issues",
                 "security": "https://github.com/sebastianbergmann/comparator/security/policy",
-                "source": "https://github.com/sebastianbergmann/comparator/tree/6.2.1"
+                "source": "https://github.com/sebastianbergmann/comparator/tree/6.3.0"
             },
             "funding": [
                 {
                     "type": "github"
                 }
             ],
-            "time": "2024-10-31T05:30:08+00:00"
+            "time": "2025-01-06T10:28:19+00:00"
         },
         {
             "name": "sebastian/complexity",
         },
         {
             "name": "sebastian/exporter",
-            "version": "6.1.3",
+            "version": "6.3.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/exporter.git",
-                "reference": "c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e"
+                "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e",
-                "reference": "c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e",
+                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/3473f61172093b2da7de1fb5782e1f24cc036dc3",
+                "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3",
                 "shasum": ""
             },
             "require": {
                 "sebastian/recursion-context": "^6.0"
             },
             "require-dev": {
-                "phpunit/phpunit": "^11.2"
+                "phpunit/phpunit": "^11.3"
             },
             "type": "library",
             "extra": {
             "support": {
                 "issues": "https://github.com/sebastianbergmann/exporter/issues",
                 "security": "https://github.com/sebastianbergmann/exporter/security/policy",
-                "source": "https://github.com/sebastianbergmann/exporter/tree/6.1.3"
+                "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.0"
             },
             "funding": [
                 {
                     "type": "github"
                 }
             ],
-            "time": "2024-07-03T04:56:19+00:00"
+            "time": "2024-12-05T09:17:50+00:00"
         },
         {
             "name": "sebastian/global-state",
             ],
             "time": "2024-10-09T05:16:32+00:00"
         },
+        {
+            "name": "staabm/side-effects-detector",
+            "version": "1.0.5",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/staabm/side-effects-detector.git",
+                "reference": "d8334211a140ce329c13726d4a715adbddd0a163"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163",
+                "reference": "d8334211a140ce329c13726d4a715adbddd0a163",
+                "shasum": ""
+            },
+            "require": {
+                "ext-tokenizer": "*",
+                "php": "^7.4 || ^8.0"
+            },
+            "require-dev": {
+                "phpstan/extension-installer": "^1.4.3",
+                "phpstan/phpstan": "^1.12.6",
+                "phpunit/phpunit": "^9.6.21",
+                "symfony/var-dumper": "^5.4.43",
+                "tomasvotruba/type-coverage": "1.0.0",
+                "tomasvotruba/unused-public": "1.0.0"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "lib/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "description": "A static analysis tool to detect side effects in PHP code",
+            "keywords": [
+                "static analysis"
+            ],
+            "support": {
+                "issues": "https://github.com/staabm/side-effects-detector/issues",
+                "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/staabm",
+                    "type": "github"
+                }
+            ],
+            "time": "2024-10-20T05:08:20+00:00"
+        },
         {
             "name": "theseer/tokenizer",
             "version": "1.2.3",
index e14fd5df23344b23488149e7381afed152a54df1..5ea4d9dcf38683f89c132b70c1479876141918b4 100644 (file)
@@ -47,7 +47,7 @@ class CookieAuth extends BaseFrameworkSystem implements Authorizeable, Registera
         * @param       $responseInstance       An instance of a Responseable class
         * @return      $loginInstance          An instance of this login class
         */
-       public static final function createCookieAuth (Responseable $responseInstance) {
+       public static final function createCookieAuth (Responseable $responseInstance): Authorizeable {
                // Get a new instance
                $loginInstance = new CookieAuth();
 
@@ -61,7 +61,7 @@ class CookieAuth extends BaseFrameworkSystem implements Authorizeable, Registera
         * @param       $userName       The username from request we shall set
         * @return      void
         */
-       public function setUserAuth (string $userName) {
+       public function setUserAuth (string $userName): void {
                FrameworkBootstrap::getResponseInstance()->addCookie('username', $userName);
        }
 
@@ -71,7 +71,7 @@ class CookieAuth extends BaseFrameworkSystem implements Authorizeable, Registera
         * @param       $passHash       The hashed password from request we shall set
         * @return      void
         */
-       public function setPasswordAuth (string $passHash) {
+       public function setPasswordAuth (string $passHash): void {
                FrameworkBootstrap::getResponseInstance()->addCookie('u_hash', $passHash);
        }
 
@@ -80,7 +80,7 @@ class CookieAuth extends BaseFrameworkSystem implements Authorizeable, Registera
         *
         * @return      $userName       Username to get from cookie
         */
-       public function getUserAuth () {
+       public function getUserAuth (): string {
                // Get the username from cookie
                $userName = FrameworkBootstrap::getRequestInstance()->readCookie('username');
 
@@ -93,7 +93,7 @@ class CookieAuth extends BaseFrameworkSystem implements Authorizeable, Registera
         *
         * @return      $passHash       Password hash to get from cookie
         */
-       public function getPasswordAuth () {
+       public function getPasswordAuth (): string {
                // Get the username from cookie
                $passHash = FrameworkBootstrap::getRequestInstance()->readCookie('u_hash');
 
@@ -106,7 +106,7 @@ class CookieAuth extends BaseFrameworkSystem implements Authorizeable, Registera
         *
         * @return      void
         */
-       public function destroyAuthData () {
+       public function destroyAuthData (): void {
                // Expire both cookies
                FrameworkBootstrap::getResponseInstance()->expireCookie('username');
                FrameworkBootstrap::getResponseInstance()->expireCookie('u_hash');
@@ -117,7 +117,7 @@ class CookieAuth extends BaseFrameworkSystem implements Authorizeable, Registera
         *
         * @return      void
         */
-       public function updateAuthData () {
+       public function updateAuthData (): void {
                FrameworkBootstrap::getResponseInstance()->refreshCookie('username');
                FrameworkBootstrap::getResponseInstance()->refreshCookie('u_hash');
        }
index 2294ba7e726203a33a24fd72b977a952c583b56f..a5b06bbed70e71296b19fffa7b8e7a9d9413cea2 100644 (file)
@@ -51,7 +51,7 @@ class MemoryCache extends BaseFrameworkSystem implements Cacheable {
         *
         * @return      $cacheInstance  An instance of this cache class
         */
-       public static final function createMemoryCache () {
+       public static final function createMemoryCache (): Cacheable {
                // Get a new instance
                $cacheInstance = new MemoryCache();
 
@@ -67,7 +67,7 @@ class MemoryCache extends BaseFrameworkSystem implements Cacheable {
         *
         * @return      void
         */
-       protected function initCache () {
+       protected function initCache (): void {
                // Now create the "data cache"
                $this->dataCache = new FrameworkArrayObject('FakedDataCache');
        }
@@ -80,7 +80,7 @@ class MemoryCache extends BaseFrameworkSystem implements Cacheable {
         * @param       $minimumCount   If array element is found then this count must at least match
         * @return      $exists                 Whether the offset exists
         */
-       public function offsetExists ($offset, $arrayElement = NULL, $minimumCount = 0) {
+       public function offsetExists (int $offset, $arrayElement = NULL, int $minimumCount = 0): bool {
                // Is it there?
                $exists = $this->dataCache->offsetExists($offset);
 
@@ -110,7 +110,7 @@ class MemoryCache extends BaseFrameworkSystem implements Cacheable {
         * @param       $data           Data to store in cache
         * @return      void
         */
-       public function offsetSet ($offset, $data) {
+       public function offsetSet (int $offset, $data): void {
                $this->dataCache->offsetSet($offset, $data);
        }
 
@@ -120,7 +120,7 @@ class MemoryCache extends BaseFrameworkSystem implements Cacheable {
         * @param       $offset         The offset we shall set
         * @return      $data           Data to store in cache
         */
-       public function offsetGet ($offset) {
+       public function offsetGet (int $offset): mixed {
                // Default is offset not found
                $data = NULL;
 
@@ -140,11 +140,11 @@ class MemoryCache extends BaseFrameworkSystem implements Cacheable {
         * @param       $offset         The offset we shall set
         * @return      void
         */
-       public function purgeOffset ($offset) {
+       public function purgeOffset (int $offset): mixed {
                // Is the offset there?
                if ($this->offsetExists($offset)) {
                        // Purge only existing keys
-                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CACHE: Unsetting cache ' . $offset);
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage('CACHE: Unsetting cache ' . $offset);
                        $this->dataCache->offsetUnset($offset);
                }
        }
index 4864ef6d51e8a89adca27f2622a7296ff79c53bb..0fa97051946b109fa80dc122d353315d87e2f9ee 100644 (file)
@@ -117,7 +117,7 @@ class HttpClient extends BaseClient implements Client {
                $responseArray = $this->doConnectRequest($host, $port);
 
                // Check array
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('HTTP-CLIENT: responseArray()=%d', count($responseArray)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('HTTP-CLIENT: responseArray()=%d', count($responseArray)));
                if (count($responseArray) < 2) {
                        // Not expected count
                        throw new UnexpectedValueException(sprintf('responseArray()=%d must have at least two elements', count($responseArray)), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
@@ -161,15 +161,15 @@ class HttpClient extends BaseClient implements Client {
                //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HTTP-CLIENT: rawRequest=' . $rawRequest);
 
                // Write request
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('HTTP-CLIENT: Sending %d bytes to this->socketResource=%s ...', strlen($rawRequest), $this->getSocketResource()));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('HTTP-CLIENT: Sending %d bytes to this->socketResource=%s ...', strlen($rawRequest), $this->getSocketResource()));
                fwrite($this->getSocketResource(), $rawRequest);
 
                // Got response?
                $feof = feof($this->getSocketResource());
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('HTTP-CLIENT: this->socketResource=%s,feof=%d', $this->getSocketResource(), intval($feof)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('HTTP-CLIENT: this->socketResource=%s,feof=%d', $this->getSocketResource(), intval($feof)));
                if ($feof) {
                        // No response received
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('HTTP-CLIENT: this->socketResource=%s has reached EOF - EXIT!', $this->getSocketResource()));
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('HTTP-CLIENT: this->socketResource=%s has reached EOF - EXIT!', $this->getSocketResource()));
                        return $response;
                }
 
@@ -177,7 +177,7 @@ class HttpClient extends BaseClient implements Client {
                $rawResponse = trim(fgets($this->getSocketResource(), 10240));
 
                // "Explode" the string to an array
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('HTTP-CLIENT: Received %d bytes back from this->socketResource=%s ...', strlen($rawResponse), $this->getSocketResource()));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('HTTP-CLIENT: Received %d bytes back from this->socketResource=%s ...', strlen($rawResponse), $this->getSocketResource()));
                $responseArray = explode(' ', $rawResponse);
 
                // And return it
@@ -210,7 +210,7 @@ class HttpClient extends BaseClient implements Client {
                ];
 
                // Prepare raw request
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('HTTP-CLIENT: Invoking this->sendRawHttpRequest(CONNECT,%s,%d,headers()=%d) ...', $host, $port, count($headers)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('HTTP-CLIENT: Invoking this->sendRawHttpRequest(CONNECT,%s,%d,headers()=%d) ...', $host, $port, count($headers)));
                $responseArray = $this->sendRawHttpRequest('CONNECT', $host, $port, $headers);
 
                // Return response array
index c783d1892fca2a1977a09ea030ff37bd945a02ca..a58bfef5872814cd06d0c7b30413ef04e208e23e 100644 (file)
@@ -124,19 +124,22 @@ class FilterChain extends BaseFrameworkSystem implements Registerable {
         */
        public function processFilters (Requestable $requestInstance, Responseable $responseInstance) {
                // Run all filters
-               //* DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('COUNT=' . $this->countGenericArray('filters'));
+               //* DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage('COUNT=' . $this->countGenericArray('filters'));
                foreach ($this->getFilters() as $filterInstance) {
                        // Try to execute this filter
                        try {
-                               //* DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('FILTER: ' . $filterInstance->__toString() . ': Processing started.');
+                               //* DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage('FILTER: ' . $filterInstance->__toString() . ': Processing started.');
                                $filterInstance->execute($requestInstance, $responseInstance);
-                               //* DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('FILTER: ' . $filterInstance->__toString() . ': Processing ended.');
+                               //* DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage('FILTER: ' . $filterInstance->__toString() . ': Processing ended.');
                        } catch (FilterChainException $e) {
                                // This exception can be thrown to just skip any further processing
-                               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Failed to execute lase filter ' . $filterInstance->__toString() . ': ' . $e->getMessage());
+                               self::createDebugInstance(__CLASS__, __LINE__)->warningMessage('Failed to execute lase filter ' . $filterInstance->__toString() . ': ' . $e->getMessage());
                                break;
                        }
                }
+
+               // Trace message
+               /* DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage('EXIT!');
        }
 
 }
index 8b67d7e08182c25efac7861b3747782c0f2b1dcd..126a93f36e85c199e83ad4fdfc9cf64a9bf072f8 100644 (file)
@@ -72,11 +72,11 @@ abstract class BaseFileIndex extends BaseIndex implements FileIndexer {
                $headerSize = $this->getIteratorInstance()->getBinaryFileInstance()->getHeaderSize();
 
                // Then read it (see constructor for calculation)
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-INDEX: headerSize=%d', $headerSize));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('BASE-FILE-INDEX: headerSize=%d', $headerSize));
                $data = $this->getIteratorInstance()->getBinaryFileInstance()->read($headerSize);
 
                // Have all requested bytes been read?
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-INDEX: Read %d bytes (%d wanted).', strlen($data), $this->getIteratorInstance()->getBinaryFileInstance()->getHeaderSize()));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('BASE-FILE-INDEX: Read %d bytes (%d wanted).', strlen($data), $this->getIteratorInstance()->getBinaryFileInstance()->getHeaderSize()));
                if (strlen($data) != $this->getIteratorInstance()->getBinaryFileInstance()->getHeaderSize()) {
                        // Invalid header length
                        throw new UnexpectedValueException(sprintf('data(%d)=%s is not expected length %d',
@@ -112,15 +112,15 @@ abstract class BaseFileIndex extends BaseIndex implements FileIndexer {
                $header = explode(chr(BinaryFile::SEPARATOR_HEADER_DATA), $data);
 
                // Map numeric entries to associative (alpha-numeric) elements
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-INDEX: Invoking ArrayUtils::mapNumericKeysToAssociative(%d) ...', count($header)));
-               //* PRINTR-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-INDEX: header(%d)=%s', count($header), print_r($header, true)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('BASE-FILE-INDEX: Invoking ArrayUtils::mapNumericKeysToAssociative(%d) ...', count($header)));
+               //* PRINTR-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('BASE-FILE-INDEX: header(%d)=%s', count($header), print_r($header, true)));
                $header = ArrayUtils::mapNumericKeysToAssociative($header, [
                        BinaryFile::HEADER_NAME_MAGIC,
                        BinaryFile::HEADER_NAME_TOTAL_ENTRIES,
                ]);
 
                // Check if the array has only 2 elements
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-INDEX: HEADER_INDEX_ELEMENT_COUNT=%d,header()=%d', BinaryFile::HEADER_INDEX_ELEMENT_COUNT, count($header)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('BASE-FILE-INDEX: HEADER_INDEX_ELEMENT_COUNT=%d,header()=%d', BinaryFile::HEADER_INDEX_ELEMENT_COUNT, count($header)));
                if (count($header) != BinaryFile::HEADER_INDEX_ELEMENT_COUNT) {
                        // Bad header
                        throw new UnexpectedValueException(sprintf('header()=%d is not expected value %d', count($header), BinaryFile::HEADER_INDEX_ELEMENT_COUNT), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
@@ -165,7 +165,7 @@ abstract class BaseFileIndex extends BaseIndex implements FileIndexer {
                );
 
                // Write it to disk (header is always at seek position 0)
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-INDEX: Invoking this->iteratorInstance->binaryFileInstance->writeAtPosition(0, header=%s) ...', $header));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('BASE-FILE-INDEX: Invoking this->iteratorInstance->binaryFileInstance->writeAtPosition(0, header=%s) ...', $header));
                $this->getIteratorInstance()->getBinaryFileInstance()->writeAtPosition(0, $header);
 
                // Trace message
@@ -199,7 +199,7 @@ abstract class BaseFileIndex extends BaseIndex implements FileIndexer {
                );
 
                // Set it
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-INDEX: Setting headerSize=%d ...', $headerSize));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('BASE-FILE-INDEX: Setting headerSize=%d ...', $headerSize));
                $this->getIteratorInstance()->getBinaryFileInstance()->setHeaderSize($headerSize);
 
                // Init counters and gaps array
@@ -228,7 +228,7 @@ abstract class BaseFileIndex extends BaseIndex implements FileIndexer {
                $this->readIndexHeader();
 
                // Freshly created?
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-INDEX: created=%d', intval($created)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('BASE-FILE-INDEX: created=%d', intval($created)));
                if (!$created) {
                        // Analyze file structure
                        /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-FILE-INDEX: Invoking this->iteratorInstance->binaryFileInstance->analyzeFileStructure() ...');
@@ -320,7 +320,7 @@ abstract class BaseFileIndex extends BaseIndex implements FileIndexer {
                }
 
                // Call iterated object's method
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-INDEX: Invoking this->iteratorInstance->binaryFileInstance->writeAtPosition(%d, %s) ...', $seekPosition, $dataStream));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('BASE-FILE-INDEX: Invoking this->iteratorInstance->binaryFileInstance->writeAtPosition(%d, %s) ...', $seekPosition, $dataStream));
                $status = $this->getIteratorInstance()->getBinaryFileInstance()->writeAtPosition($seekPosition, $dataStream);
 
                // Return status
index f47f423c95bd92dc34523c4d3ac697b1509ea96c..ea8ef7ca087ec359e99fba1cd276c98531a126f1 100644 (file)
@@ -106,21 +106,21 @@ class FileStackIndex extends BaseFileIndex implements IndexableStack, Registerab
                        Indexable::SEPARATOR_GAP_LENGTH,
                        $data[StackableFile::ARRAY_NAME_DATA_LENGTH]
                );
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILE-STACK-INDEX: stackName=%s,hash{}=0x%s,rawData(%d)=%s', $stackName, bin2hex($data[StackableFile::ARRAY_NAME_HASH]), strlen($rawData), $rawData));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('FILE-STACK-INDEX: stackName=%s,hash{}=0x%s,rawData(%d)=%s', $stackName, bin2hex($data[StackableFile::ARRAY_NAME_HASH]), strlen($rawData), $rawData));
 
                // Search for next free gap
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILE-STACK-INDEX: Invoking this->iteratorInstance->binaryFileInstance->searchNextGap(%d) ...', strlen($rawData)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('FILE-STACK-INDEX: Invoking this->iteratorInstance->binaryFileInstance->searchNextGap(%d) ...', strlen($rawData)));
                $gapPosition = $this->getIteratorInstance()->getBinaryFileInstance()->searchNextGap(strlen($rawData));
 
                // Gap position cannot be smaller or equal than header length
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILE-STACK-INDEX: stackName=%s,hash{}=0x%s,gapPosition=%s', $stackName, bin2hex($data[StackableFile::ARRAY_NAME_HASH]), $gapPosition));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('FILE-STACK-INDEX: stackName=%s,hash{}=0x%s,gapPosition=%s', $stackName, bin2hex($data[StackableFile::ARRAY_NAME_HASH]), $gapPosition));
                if ($gapPosition <= ($this->getIteratorInstance()->getBinaryFileInstance()->getHeaderSize() + 1)) {
                        // Not valid gap position returned
                        throw new UnexpectedValueException(sprintf('gapPosition[%s]=%d is smaller or equal headerSize+1=%d', gettype($gapPosition), $gapPosition, ($this->getIteratorInstance()->getBinaryFileInstance()->getHeaderSize() + 1)), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                }
 
                // Then write the data at that gap
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILE-STACK-INDEX: Invoking this->iteratorInstance->binaryFileInstance->writeData(%d,%s) ...', $gapPosition, $rawData));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('FILE-STACK-INDEX: Invoking this->iteratorInstance->binaryFileInstance->writeData(%d,%s) ...', $gapPosition, $rawData));
                $this->getIteratorInstance()->getBinaryFileInstance()->writeData($gapPosition, $rawData);
 
                // Trace message
index 0255453860fabba2412fdf3714156102aae2f546..305f7c59b9ca5ec54fae0216ade2eff5bb82d7dd 100644 (file)
@@ -166,7 +166,7 @@ class FileIterator extends BaseIterator implements SeekableIterator {
         */
        public function seek (int $seekPosition): void {
                // Validate parameter
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILE-ITERATOR: seekPosition=%d,whence=%d - CALLED!', $seekPosition, $whence));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('FILE-ITERATOR: seekPosition=%d,whence=%d - CALLED!', $seekPosition, $whence));
                if ($seekPosition < 0) {
                        // Throw IAE
                        throw new OutOfBoundsException(sprintf('seekPosition=%d is not valid', $seekPosition));
index 8e2584be0fdb24969d63788109741275af1da32e..c04091301fa7af13999373d2b3cf7c4adace40fd 100644 (file)
@@ -90,7 +90,7 @@ class XmlParser extends BaseParser implements Parseable {
                $xmlParser = xml_parser_create();
 
                // Force case-folding to on
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('XML-PARSER: Created xmlParser=%s ...', $xmlParser));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('XML-PARSER: Created xmlParser=%s ...', $xmlParser));
                xml_parser_set_option($xmlParser, XML_OPTION_CASE_FOLDING, TRUE);
 
                // Set UTF-8
@@ -104,7 +104,7 @@ class XmlParser extends BaseParser implements Parseable {
                xml_set_character_data_handler($xmlParser, 'characterHandler');
 
                // Now parse the XML tree
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('XML-PARSER: Invoking xml_parse(%s, content()=%d) ...', $xmlParser, strlen($content)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('XML-PARSER: Invoking xml_parse(%s, content()=%d) ...', $xmlParser, strlen($content)));
                if (!xml_parse($xmlParser, $content)) {
                        // Error found in XML
                        //* DEBUG: */ exit(__METHOD__ . ':<pre>'.htmlentities($content).'</pre>');
@@ -112,11 +112,11 @@ class XmlParser extends BaseParser implements Parseable {
                }
 
                // Free the parser
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('XML-PARSER: Freeing xmlParser=%s ...', $xmlParser));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('XML-PARSER: Freeing xmlParser=%s ...', $xmlParser));
                xml_parser_free($xmlParser);
 
                // Trace message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('XML-PARSER: EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage('XML-PARSER: EXIT!');
        }
 
 }
index ed7f37aa182dbc2db94611bfed75dc23fcb3ff26..9c950ef23e2d084dc93e905b6e11fb0d6da0a250 100644 (file)
@@ -87,7 +87,7 @@ class NullCryptoStream extends BaseCryptoStream implements EncryptableStream {
         * @throws      UnsupportedOperationException   If this method is called (which is a mistake)
         */
        public function streamData (string $data) {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
+               self::createDebugInstance(__CLASS__, __LINE__)->warningMessage('Unhandled ' . strlen($data) . ' bytes in this stream.');
                throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
index e69c4a1fa6f7938b059ea42909dbe7b5717ec2d8..bcc56ce89fcb2d141218ec19ad59daf130f5ab9c 100644 (file)
@@ -71,7 +71,7 @@ class OpenSslStream extends BaseCryptoStream implements EncryptableStream {
                return $str;
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('OPENSSL-STREAM: key[' . gettype($key) . ']=' . $key);
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage('OPENSSL-STREAM: key[' . gettype($key) . ']=' . $key);
 
                // Init crypto module
                $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
@@ -177,7 +177,7 @@ class OpenSslStream extends BaseCryptoStream implements EncryptableStream {
         * @throws      UnsupportedOperationException   If this method is called (which is a mistake)
         */
        public function streamData (string $data) {
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
+               self::createDebugInstance(__CLASS__, __LINE__)->warningMessage('Unhandled ' . strlen($data) . ' bytes in this stream.');
                throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
index c29e06442e4be7711ce5494c2031fd8716f6ee35..e854c1726b81ac013b9345487ab2dd5c7a1f015a 100644 (file)
@@ -1007,14 +1007,14 @@ abstract class BaseTemplateEngine extends BaseFrameworkSystem {
                        // RECURSIVE PROTECTION! BE CAREFUL HERE!
                        if ((!isset($this->loadedRawData[$template])) && (!in_array($template, $this->loadedTemplates))) {
                                // Template not found, but maybe variable assigned?
-                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-TEMPLATE: template=%s not loaded yet', $template));
+                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('BASE-TEMPLATE: template=%s not loaded yet', $template));
                                if ($this->getVariableIndex($template) !== false) {
                                        // Use that content here
-                                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-TEMPLATE: Assigning this->loadedTemplateData[%s] from variable template=%s ...', $template, $template));
+                                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('BASE-TEMPLATE: Assigning this->loadedTemplateData[%s] from variable template=%s ...', $template, $template));
                                        $this->loadedRawData[$template] = $this->readVariable($template);
 
                                        // Recursive protection:
-                                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-TEMPLATE: Marking template=%s as loaded ...', $template));
+                                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('BASE-TEMPLATE: Marking template=%s as loaded ...', $template));
                                        array_push($this->loadedTemplates, $template);
                                } else {
                                        // Then try to search for code-templates
@@ -1025,16 +1025,16 @@ abstract class BaseTemplateEngine extends BaseFrameworkSystem {
                                                $this->loadCodeTemplate($template);
 
                                                // ... and remember it's contents
-                                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-TEMPLATE: Setting this->loadedRawData[%s] from this->rawTemplateData ...', $template));
+                                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('BASE-TEMPLATE: Setting this->loadedRawData[%s] from this->rawTemplateData ...', $template));
                                                $this->loadedRawData[$template] = $this->getRawTemplateData();
 
                                                // Remember this template for recursion detection
                                                // RECURSIVE PROTECTION!
-                                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-TEMPLATE: Marking template=%s as loaded ...', $template));
+                                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('BASE-TEMPLATE: Marking template=%s as loaded ...', $template));
                                                array_push($this->loadedTemplates, $template);
                                        } catch (FileNotFoundException $e) {
                                                // Even this is not done... :/
-                                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-TEMPLATE: Marking template=%s as loaded ...', $template));
+                                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('BASE-TEMPLATE: Marking template=%s as loaded ...', $template));
                                                array_push($this->rawTemplates, $template);
                                        }
                                }
@@ -1084,7 +1084,7 @@ abstract class BaseTemplateEngine extends BaseFrameworkSystem {
                $this->compileTemplate();
 
                // 4. Remember it's contents
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-TEMPLATE: Setting this->loadedRawData[%s] from this->rawTemplateData ...', $template));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('BASE-TEMPLATE: Setting this->loadedRawData[%s] from this->rawTemplateData ...', $template));
                $this->loadedRawData[$template] = $this->getRawTemplateData();
 
                // 5. Restore the previous raw content from backup variable
@@ -1608,7 +1608,7 @@ abstract class BaseTemplateEngine extends BaseFrameworkSystem {
                        // Goes something wrong?
                        if ((!isset($result)) || (empty($result))) {
                                // Output eval command
-                               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('Failed eval() code: <pre>%s</pre>', $this->markupCode($eval, true)), true);
+                               self::createDebugInstance(__CLASS__, __LINE__)->warningMessage(sprintf('Failed eval() code: <pre>%s</pre>', $this->markupCode($eval, true)), true);
 
                                // Output backtrace here
                                $this->debugBackTrace();
index 00f291f0564fea6914a25468ea43fd8817c05631..472ef98b8f086cf37828e493da83c76bc5d4cb5a 100644 (file)
@@ -29,6 +29,36 @@ use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 interface Authorizeable extends FrameworkInterface {
+       /**
+        * "Setter" for username auth data
+        *
+        * @param       $userName       The username from request we shall set
+        * @return      void
+        */
+       function setUserAuth (string $userName): void;
+
+       /**
+        * "Setter" for password hash auth data
+        *
+        * @param       $passHash       The hashed password from request we shall set
+        * @return      void
+        */
+       function setPasswordAuth (string $passHash): void;
+
+       /**
+        * Getter for user auth cookie
+        *
+        * @return      $userName       Username to get from cookie
+        */
+       function getUserAuth (): string;
+
+       /**
+        * Getter for password hash auth cookie
+        *
+        * @return      $passHash       Password hash to get from cookie
+        */
+       function getPasswordAuth (): string;
+
        /**
         * Destroy the authorization data
         *
index 51a628789e175ef174da2ef69750138bcc8afa03..66e815e2d5eda15020a19c16a137d3ddd352fd17 100644 (file)
@@ -36,7 +36,7 @@ interface Cacheable extends FrameworkInterface {
         * @param       $minimumCount   If array element is found then this count must at least match
         * @return      $exists                 Whether the offset exists
         */
-       function offsetExists($offset, $arrayElement = NULL, $minimumCount = 0);
+       function offsetExists(int $offset, $arrayElement = NULL, int $minimumCount = 0): bool;
 
        /**
         * Setter for cache offset
@@ -45,7 +45,7 @@ interface Cacheable extends FrameworkInterface {
         * @param       $data           Data to store in cache
         * @return      void
         */
-       function offsetSet($offset, $data);
+       function offsetSet(int $offset, $data): void;
 
        /**
         * Getter for cache offset or "null" if not found
@@ -53,7 +53,7 @@ interface Cacheable extends FrameworkInterface {
         * @param       $offset         The offset we shall set
         * @return      $data           Data to store in cache
         */
-       function offsetGet($offset);
+       function offsetGet(int $offset): mixed;
 
        /**
         * Purges the given cache entry
@@ -61,6 +61,6 @@ interface Cacheable extends FrameworkInterface {
         * @param       $offset         The offset we shall set
         * @return      void
         */
-       function purgeOffset($offset);
+       function purgeOffset(int $offset): mixed;
 
 }