]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/file_directories/binary/index/class_IndexFile.php
Continued:
[core.git] / framework / main / classes / file_directories / binary / index / class_IndexFile.php
index c485275fa1e2b7d416280d781dd85668f69d046a..010927136fd069a19bc37b933c2b75278462cc7f 100644 (file)
@@ -3,9 +3,10 @@
 namespace Org\Mxchange\CoreFramework\Filesystem\Index;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Filesystem\Block;
 use Org\Mxchange\CoreFramework\Filesystem\File\BaseBinaryFile;
+use Org\Mxchange\CoreFramework\Filesystem\Index\IndexableFile;
 use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Index\Stack\IndexableStack;
 
 // Import SPL stuff
 use \SplFileInfo;
@@ -32,7 +33,7 @@ use \SplFileInfo;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class IndexFile extends BaseBinaryFile implements Block {
+class IndexFile extends BaseBinaryFile implements IndexableFile {
        /**
         * Protected constructor
         *
@@ -47,26 +48,26 @@ class IndexFile extends BaseBinaryFile implements Block {
         * Creates an instance of this File class and prepares it for usage
         *
         * @param       $fileInfoInstance       An instance of a SplFileInfo class
-        * @param       $blockInstance  An instance of a Block class
-        * @return      $fileInstance   An instance of this File class
+        * @param       $indexInstance  An instance of a IndexableStack class
+        * @return      $indexFileInstance      An instance of an IndexableFile class
         */
-       public final static function createIndexFile (SplFileInfo $fileInfoInstance, Block $blockInstance) {
+       public final static function createIndexFile (SplFileInfo $fileInfoInstance, IndexableStack $indexInstance) {
                // Get a new instance
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('INDEX-FILE: fileInfoInstance[%s]=%s,blockInstance=%s - CALLED!', get_class($fileInfoInstance), $fileInfoInstance, $blockInstance->__toString()));
-               $fileInstance = new IndexFile();
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('INDEX-FILE: fileInfoInstance[%s]=%s,indexInstance=%s - CALLED!', get_class($fileInfoInstance), $fileInfoInstance, $indexInstance->__toString()));
+               $indexFileInstance = new IndexFile();
 
-               // Set block instance here for callbacks
-               $fileInstance->setBlockInstance($blockInstance);
+               // Set file instance here for callbacks
+               $indexFileInstance->setIndexableStackInstance($indexInstance);
 
                // Expand file name with .idx
                $indexInfoInstance = new SplFileInfo(sprintf('%s.idx', $fileInfoInstance->__toString()));
 
                // Init this abstract file
-               $fileInstance->initFile($indexInfoInstance);
+               $indexFileInstance->initFile($indexInfoInstance);
 
                // Return the prepared instance
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('INDEX-FILE: fileInstance=%s - EXIT!', $fileInstance->__toString()));
-               return $fileInstance;
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('INDEX-FILE: indexFileInstance=%s - EXIT!', $indexFileInstance->__toString()));
+               return $indexFileInstance;
        }
 
        /**