X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fio%2Fclass_FrameworkDirectoryPointer.php;h=f9eacc71fbbe5d4d9df3ad44c5cde5b351b22578;hb=4365745a3952764d684556852c31d0e8cba5e58e;hp=f02faf992390c00c784688b67b96e6a9783bbb48;hpb=49307b1d5278d5a968ab391dd88abb9b9ee06df8;p=mailer.git diff --git a/inc/classes/main/io/class_FrameworkDirectoryPointer.php b/inc/classes/main/io/class_FrameworkDirectoryPointer.php index f02faf9923..f9eacc71fb 100644 --- a/inc/classes/main/io/class_FrameworkDirectoryPointer.php +++ b/inc/classes/main/io/class_FrameworkDirectoryPointer.php @@ -2,11 +2,11 @@ /** * A class for directory reading and getting its contents * - * @author Roland Haeder - * @version 0.3.0 + * @author Roland Haeder + * @version 0.0.0 * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software * @license GNU GPL 3.0 or any newer version - * @link http://www.mxchange.org + * @link http://www.ship-simu.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ class FrameworkDirectoryPointer extends BaseFrameworkSystem { /** @@ -33,17 +33,17 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem { private $dirPointer = null; /** - * Private constructor + * Protected constructor */ - private function __construct () { + protected function __construct () { // Call parent constructor - parent::constructor(__CLASS__); + parent::__construct(__CLASS__); // Set part description - $this->setObjectDescription("Verzeichnis-Handler"); + $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);