]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Fri, 22 Aug 2025 01:44:38 +0000 (03:44 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 22 Aug 2025 01:47:35 +0000 (03:47 +0200)
- proper returned type

framework/main/classes/factories/xml/class_XmlTemplateEngineFactory.php
framework/main/classes/file_directories/io_stream/class_FileIoStream.php
framework/main/classes/file_directories/text/class_BaseTextFile.php
framework/main/interfaces/io/file/class_FileInputStreamer.php
framework/main/middleware/io/class_FileIoHandler.php

index 81f4468e1a1d7bb7dff19237ff7c809105c2acdb..d862020c832529cedbcdd13147910502cf020ef9 100644 (file)
@@ -3,6 +3,7 @@
 namespace Org\Mxchange\CoreFramework\Factory\Template;
 
 // Import framework stuff
+use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
 use Org\Mxchange\CoreFramework\Factory\BaseFactory;
 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
@@ -54,7 +55,7 @@ class XmlTemplateEngineFactory extends BaseFactory {
         * @param       $configKey              Config entry name for the template engine
         * @return      $templateInstance       A template engine instance
         */
-       public static final function createXmlTemplateEngineInstance (string $configKey): XmlTemplateEngineFactory {
+       public static final function createXmlTemplateEngineInstance (string $configKey): CompileableXmlTemplate {
                // Validate parameter
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('XML-TEMPLATE-ENGINE-FACTORY: configKey=%s - CALLED!', $configKey));
                if (empty($configKey)) {
index 34d16fafca3441b3a722a486af902e0f48af4092..6c31d0ab7c5a61d9dd7c2cb2f828ab60597a2c03 100644 (file)
@@ -167,10 +167,10 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil
         * Reads from a local file
         *
         * @param       $infoInstance   An instance of a SplFileInfo class
-        * @return      $array  An array with the element 'header' and 'data'
+        * @return      $content        Raw file content
         * @see         FileInputStreamer
         */
-       public final function loadFileContents (SplFileInfo $infoInstance): array {
+       public final function loadFileContents (SplFileInfo $infoInstance): string {
                // Initialize some variables and arrays
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('FILE-IO-STREAM: infoInstance=%s - CALLED!', $infoInstance));
                $inputBuffer = '';
index bfb00fb026cd8e091a26d2e992ebaf92c1dccb34..5637f5cbf81fb7d75b47ce0d1b7b9b221176a1db 100644 (file)
@@ -71,11 +71,11 @@ abstract class BaseTextFile extends BaseAbstractFile {
         * Reads from a local or remote file
         *
         * @param       $infoInstance   An instance of a SplFileInfo class
-        * @return      $array  An array containing all read lines
+        * @return      $content        Raw file content
         * @throws      InvalidArrayCountException      If an array has not the expected size
         * @throws      InvalidMD5ChecksumException     If two MD5 hashes did not match
         */
-       public function loadFileContents (SplFileInfo $infoInstance): array {
+       public function loadFileContents (SplFileInfo $infoInstance): string {
                /*
                 * This class (or its implementations) are special file readers/writers.
                 * There is no need to read/write the whole file.
index 3c4bac1821bcc34d3543b80155eec76f2c981cd3..8676e3701d016ff1f8c04f4d91041f053ca191e3 100644 (file)
@@ -35,10 +35,10 @@ interface FileInputStreamer extends StreamableInput {
         * Reads from a local or remote file
         *
         * @param       $infoInstance   An instance of a SplFileInfo class
-        * @return      $array  An array containing all read lines
+        * @return      $content        Raw file content
         * @throws      InvalidArrayCountException      If an array has not the expected size
         * @throws      InvalidMD5ChecksumException     If two MD5 hashes did not match
         */
-       function loadFileContents (SplFileInfo $infoInstance);
+       function loadFileContents (SplFileInfo $infoInstance): string;
 
 }
index 24506c26cb7fd6b1e559fc63d6e861451822cc2a..f122923d833759aa046ff715411f706250ddea9a 100644 (file)
@@ -153,9 +153,9 @@ class FileIoHandler extends BaseMiddleware implements IoHandler {
        /** Loads data from a file over the input handler
         *
         * @param       $infoInstance   An instance of a SplFileInfo class
-        * @return      $array  Array with the file contents
+        * @return      $content        Raw file content
         */
-       public function loadFileContents (SplFileInfo $infoInstance): array {
+       public function loadFileContents (SplFileInfo $infoInstance): string {
                // Read from the input handler
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('FILE-IO-HANDLER: infoInstance=%s - CALLED!', $infoInstance->__toString()));
                return $this->getInputStreamerInstance()->loadFileContents($infoInstance);