<?php
// Own namespace
-namespace CoreFramework\Filesystem\Index;
+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\Generic\UnsupportedOperationException;
+
+// Import SPL stuff
+use \SplFileInfo;
/**
* An index file class
/**
* 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();
$fileInstance->setBlockInstance($blockInstance);
// Init this abstract file
- $fileInstance->initFile($fileName);
+ $fileInstance->initFile($fileInfoInstance);
// Return the prepared instance
return $fileInstance;
* @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);
}