* 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 StackFile extends BaseFile implements SeekableWritableFileIterator {
+class StackFile extends BaseFile implements Block {
/**
* Protected constructor
*
/**
* Creates an instance of this File class and prepares it for usage
*
+ * @param $fileName Name of the stack file
+ * @param $blockInstance An instance of a Block class
* @return $fileInstance An instance of this File class
*/
- public final static function createStackFile () {
+ public final static function createStackFile ($fileName, Block $blockInstance) {
// Get a new instance
$fileInstance = new StackFile();
+ // Set block instance here for callbacks
+ $fileInstance->setBlockInstance($blockInstance);
+
+ // Init this abstract file
+ $fileInstance->initFile($fileName);
+
// Return the prepared instance
return $fileInstance;
}