]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/file_directories/class_BaseAbstractFile.php
Continued:
[core.git] / framework / main / classes / file_directories / class_BaseAbstractFile.php
index 171ad3b73da0be451b94d90f63e53ea5f5e3c054..88974fa5a4ec3565ecce6208743c4d092c3c4645 100644 (file)
@@ -13,7 +13,7 @@ use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2020 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2022 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -117,6 +117,7 @@ abstract class BaseAbstractFile extends BaseFrameworkSystem implements FilePoint
         */
        public final function getCounter () {
                // Get it
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-ABSTRACT-FILE: Getting this->totalEntries=%d ... - CALLED!', $this->totalEntries));
                return $this->totalEntries;
        }
 
@@ -128,6 +129,7 @@ abstract class BaseAbstractFile extends BaseFrameworkSystem implements FilePoint
         */
        protected final function setCounter (int $counter) {
                // Set it
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-ABSTRACT-FILE: Setting this->totalEntries=%d ... - CALLED!', $counter));
                $this->totalEntries = $counter;
        }
 
@@ -138,7 +140,11 @@ abstract class BaseAbstractFile extends BaseFrameworkSystem implements FilePoint
         */
        protected final function incrementCounter () {
                // Get it
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-ABSTRACT-FILE: CALLED!');
                $this->totalEntries++;
+
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-ABSTRACT-FILE: EXIT!');
        }
 
        /**
@@ -150,6 +156,14 @@ abstract class BaseAbstractFile extends BaseFrameworkSystem implements FilePoint
                return $this->getPointerInstance()->getFileObject();
        }
 
+       /**
+        * Getter for file's name
+        */
+       public final function getFilename () {
+               // Invole file object's method
+               return $this->getFileObject()->getFilename();
+       }
+
        /**
         * Close a file source and set it's instance to null and the file name
         * to empty
@@ -157,14 +171,12 @@ abstract class BaseAbstractFile extends BaseFrameworkSystem implements FilePoint
         * @return      void
         */
        public function closeFile () {
-               // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: CALLED!', __METHOD__, __LINE__));
-
                // Close down pointer instance as well by unsetting it
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-ABSTRACT-FILE: CALLED!');
                $this->unsetPointerInstance();
 
-               // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: EXIT!', __METHOD__, __LINE__));
+               // Trace message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-ABSTRACT-FILE: EXIT!');
        }
 
        /**