]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/file_directories/binary/index/class_IndexFile.php
Renamed Registry -> GenericRegistry to make it clear that this registry does
[core.git] / framework / main / classes / file_directories / binary / index / class_IndexFile.php
index 1e4fa7a477ce9f48fa2457824dea8e35966af32e..958792df018ceb9420f4eb1b6b9d6182eb2fa370 100644 (file)
@@ -1,10 +1,14 @@
 <?php
 // Own namespace
-namespace CoreFramework\Filesystem\Index;
+namespace Org\Mxchange\CoreFramework\Filesystem\Index;
 
 // Import framework stuff
-use CoreFramework\Filesystem\Block;
-use CoreFramework\Filesystem\File\BaseBinaryFile;
+use Org\Mxchange\CoreFramework\Filesystem\Block;
+use Org\Mxchange\CoreFramework\Filesystem\File\BaseBinaryFile;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
+
+// Import SPL stuff
+use \SplFileInfo;
 
 /**
  * An index file class
@@ -42,11 +46,11 @@ class IndexFile extends BaseBinaryFile implements Block {
        /**
         * Creates an instance of this File class and prepares it for usage
         *
-        * @param       $fileName               Name of the index file
+        * @param       $fileInfoInstance       An instance of a SplFileInfo class
         * @param       $blockInstance  An instance of a Block class
         * @return      $fileInstance   An instance of this File class
         */
-       public final static function createIndexFile ($fileName, Block $blockInstance) {
+       public final static function createIndexFile (SplFileInfo $fileInfoInstance, Block $blockInstance) {
                // Get a new instance
                $fileInstance = new IndexFile();
 
@@ -54,7 +58,7 @@ class IndexFile extends BaseBinaryFile implements Block {
                $fileInstance->setBlockInstance($blockInstance);
 
                // Init this abstract file
-               $fileInstance->initFile($fileName);
+               $fileInstance->initFile($fileInfoInstance);
 
                // Return the prepared instance
                return $fileInstance;
@@ -69,7 +73,7 @@ class IndexFile extends BaseBinaryFile implements Block {
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function writeValueToFile ($groupId, $value) {
-               self::createDebugInstance(__CLASS__, __LINE__)->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);
        }