Renamed Registry -> GenericRegistry to make it clear that this registry does
[core.git] / framework / main / classes / file_directories / binary / stack / class_StackFile.php
index 87b3c0b864960a606a4adeb1ab9ffe5ef4c8c5d1..444302ba74e7daa317816b0546a2ebe96cb325ab 100644 (file)
@@ -1,6 +1,14 @@
 <?php
 // Own namespace
-namespace CoreFramework\Filesystem\Stack;
+namespace Org\Mxchange\CoreFramework\Filesystem\Stack;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Filesystem\Block;
+use Org\Mxchange\CoreFramework\Filesystem\File\BaseBinaryFile;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
+
+// Import SPL stuff
+use \SplFileInfo;
 
 /**
  * A stack file class
@@ -38,11 +46,11 @@ class StackFile extends BaseBinaryFile implements Block {
        /**
         * Creates an instance of this File class and prepares it for usage
         *
-        * @param       $fileName               Name of the stack file
+        * @param       $infoInstance   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 createStackFile ($fileName, Block $blockInstance) {
+       public final static function createStackFile (SplFileInfo $infoInstance, Block $blockInstance) {
                // Get a new instance
                $fileInstance = new StackFile();
 
@@ -50,7 +58,7 @@ class StackFile extends BaseBinaryFile implements Block {
                $fileInstance->setBlockInstance($blockInstance);
 
                // Init this abstract file
-               $fileInstance->initFile($fileName);
+               $fileInstance->initFile($infoInstance);
 
                // Return the prepared instance
                return $fileInstance;