]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/file_directories/stack/class_StackFile.php
Interface 'Block' is implemented also here ...
[core.git] / inc / classes / main / file_directories / stack / class_StackFile.php
index 23ffe84257405215b6e22cb8280103f7f43eae56..863362c3e10f056d0dad4662a51a944ddda04432 100644 (file)
@@ -21,7 +21,7 @@
  * 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
         *
@@ -35,12 +35,20 @@ class StackFile extends BaseFile implements SeekableWritableFileIterator {
        /**
         * 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;
        }