]> git.mxchange.org Git - mailer.git/blobdiff - inc/classes/main/io/class_FrameworkFileOutputPointer.php
Code sync from ship-simu code (all class config entries must end with _class!)
[mailer.git] / inc / classes / main / io / class_FrameworkFileOutputPointer.php
index 9705137b6075a85f24f473424cc59c5288434859..5a7acddd62e01ad1f1670461fc8751d050230ac4 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * A class for writing files
  *
- * @author             Roland Haeder <webmaster@mxchange.org>
- * @version            0.3.0
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class FrameworkFileOutputPointer extends BaseFrameworkSystem {
        /**
@@ -33,17 +33,17 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem {
        private $filePointer = null;
 
        /**
-        * Private constructor
+        * Protected constructor
         */
-       private final function __construct () {
+       protected function __construct () {
                // Call parent constructor
-               parent::constructor(__CLASS__);
+               parent::__construct(__CLASS__);
 
                // Set part description
-               $this->setObjectDescription("Dateiausgabe-Handler");
+               $this->setObjectDescription("Handler for writing to files");
 
                // Create unique ID
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean-up a little
                $this->removeNumberFormaters();
@@ -67,12 +67,11 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem {
         * Create a file pointer based on the given file. The file will also
         * be verified here.
         *
-        * @param               $fileName                               The file name we shall pass
-        *                                                              to fopen()
-        * @param               $mode                           The output mode ('w', 'a' are valid)
+        * @param       $fileName       The file name we shall pass to fopen()
+        * @param       $mode           The output mode ('w', 'a' are valid)
         * @throws      FileIsEmptyException    If the provided file name is empty.
         * @throws      FilePointerNotOpened    If fopen() returns not a file
-        *                                                              resource
+        *                                                                      resource
         * @return      void
         */
        public final static function createFrameworkFileOutputPointer ($fileName, $mode) {
@@ -103,12 +102,12 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem {
        /**
         * Write data to a file pointer
         *
-        * @param               $dataStream     The data stream we shall write to the file
-        * @return      mixed           The result of fwrite()
+        * @param       $dataStream             The data stream we shall write to the file
+        * @return      mixed                   The result of fwrite()
         * @throws      NullPointerException    If the file pointer instance
-        *                                                              is not set by setPointer()
+        *                                                                      is not set by setPointer()
         * @throws      InvalidFileResourceException    If there is being set
-        *                                                                      an invalid file resource
+        *                                                                                      an invalid file resource
         */
        public function writeToFile ($dataStream) {
                if (is_null($this->getPointer())) {
@@ -129,7 +128,7 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem {
         *
         * @return      void
         * @throws      NullPointerException    If the file pointer instance
-        *                                                              is not set by setPointer()
+        *                                                                      is not set by setPointer()
         * @throws      InvalidFileResourceException    If there is being set
         */
        public function closeFile () {
@@ -150,7 +149,7 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem {
        /**
         * Setter for the file pointer
         *
-        * @param               $filePointer    File resource
+        * @param       $filePointer    File resource
         * @return      void
         */
        public final function setPointer ($filePointer) {
@@ -168,7 +167,7 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem {
         * Getter for the file pointer
         *
         * @return      $filePointer    The file pointer which shall be a valid
-        *                                              file resource
+        *                                                      file resource
         */
        public final function getPointer () {
                return $this->filePointer;
@@ -177,7 +176,7 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem {
        /**
         * Setter for file name
         *
-        * @param               $fileName               The new file name
+        * @param       $fileName       The new file name
         * @return      void
         */
        public final function setFileName ($fileName) {
@@ -188,7 +187,7 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem {
        /**
         * Getter for file name
         *
-        * @return      $fileName               The current file name
+        * @return      $fileName       The current file name
         */
        public final function getFileName () {
                return $this->fileName;