]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/file_directories/directory/class_FrameworkDirectoryPointer.php
Fixed parser error.
[core.git] / inc / classes / main / file_directories / directory / class_FrameworkDirectoryPointer.php
index 634d8a7897004e9b4b345ce38271599d73bb6b05..1cc296ca2a72761fd546ba2a6b5e07795dd75be9 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -196,18 +196,18 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework
         */
        public function closeDirectory () {
                // Close the directory by unsetting it
-               $this->setDirectoryIteratorInstance(NULL);
+               $this->unsetDirectoryIteratorInstance();
                $this->setPathName('');
        }
 
        /**
         * Setter for the directory pointer
         *
-        * @param       $iteratorInstance       An instanceof a DirectoryIterator class or NULL to unset ("close") it.
+        * @param       $iteratorInstance       An instanceof a DirectoryIterator class
         * @return      void
         */
-       protected final function setDirectoryIteratorInstance (DirectoryIterator $iteratorInstance = NULL) {
-               // Set instance (or NULL)
+       protected final function setDirectoryIteratorInstance (DirectoryIterator $iteratorInstance) {
+               // Set instance
                $this->iteratorInstance = $iteratorInstance;
        }
 
@@ -220,6 +220,19 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework
                return $this->iteratorInstance;
        }
 
+       /**
+        * Remove directory iterator instance (effectively closing it) by setting
+        * it to NULL. This will trigger a call on the destructor which will then
+        * "close" the iterator.
+        *
+        * @param       $iteratorInstance       An instanceof a DirectoryIterator class
+        * @return      void
+        */
+       protected final function unsetDirectoryIteratorInstance () {
+               // "Unset" the instance
+               $this->iteratorInstance = NULL;
+       }
+
        /**
         * Setter for path name
         *