Rewritten:
[core.git] / framework / main / classes / file_directories / text / class_BaseTextFile.php
index b37010ba918c8a728b52ba35551594f793e500d7..dccc5ae619b74ee7fe583cd32295570c314716c4 100644 (file)
@@ -6,6 +6,9 @@ namespace CoreFramework\Filesystem\File;
 use CoreFramework\Filesystem\File\BaseAbstractFile;
 use CoreFramework\Generic\UnsupportedOperationException;
 
+// Import SPL stuff
+use \SplFileInfo;
+
 /**
  * A general text file class
  *
@@ -66,17 +69,17 @@ class BaseTextFile extends BaseAbstractFile {
        /**
         * Reads from a local or remote file
         *
-        * @param       $fqfn   The file's FQFN we shall load
+        * @param       $infoInstance   An instance of a SplFileInfo class
         * @return      $array  An array containing all read lines
         * @throws      InvalidArrayCountException      If an array has not the expected size
         * @throws      InvalidMD5ChecksumException     If two MD5 hashes did not match
         */
-       public function loadFileContents ($fqfn) {
+       public function loadFileContents (SplFileInfo $infoInstance) {
                /*
                 * This class (or its implementations) are special file readers/writers.
                 * There is no need to read/write the whole file.
                 */
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] fqfn=' . $fqfn);
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] infoInstance=' . $infoInstance);
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }