More code merged from ship-simu
[mailer.git] / inc / classes / main / io / class_FrameworkDirectoryPointer.php
index f0f2dd8a9a5c0515f400468e23a3e529acab3f5a..6206023750941ab67c58c16e633b0add0209ad8f 100644 (file)
@@ -43,7 +43,7 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem {
                $this->setObjectDescription("Helper for handling directories");
 
                // Create unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean-up a little
                $this->removeNumberFormaters();
@@ -143,20 +143,8 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem {
         *
         * @return      string  Directory and/or file names read from the current
         *                                      directory pointer
-        * @throws      NullPointerException    If the directory pointer instance
-        *                                                              is not set by setPointer()
-        * @throws      InvalidDirectoryResourceException       If there is being set
-        *                                                                              an invalid directory resource
         */
        public function readRawDirectory () {
-               if (is_null($this->getPointer())) {
-                       // Pointer not initialized
-                       throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
-               } elseif (!is_resource($this->getPointer())) {
-                       // Pointer is not a valid resource!
-                       throw new InvalidDirectoryResourceException($this, self::EXCEPTION_INVALID_DIRECTORY_POINTER);
-               }
-
                // Read data from the directory pointer and return it
                return readdir($this->getPointer());
        }
@@ -197,19 +185,8 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem {
         * to empty
         *
         * @return      void
-        * @throws      NullPointerException    If the directory pointer instance
-        *                                                              is not set by setPointer()
-        * @throws      InvalidDirectoryResourceException       If there is being set
         */
        public function closeDirectory () {
-               if (is_null($this->getPointer())) {
-                       // Pointer not initialized
-                       return;
-               } elseif (!is_resource($this->getPointer())) {
-                       // Pointer is not a valid resource!
-                       throw new InvalidDirectoryResourceException($this, self::EXCEPTION_INVALID_DIRECTORY_POINTER);
-               }
-
                // Close the directory pointer and reset the instance variable
                @closedir($this->getPointer());
                $this->setPointer(null);