]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php
Continued:
[core.git] / framework / main / classes / file_directories / output / text / class_FrameworkTextFileOutputPointer.php
index d94ec9ce86664f1203313ceee86a45b40ca88199..33aa707c7367588e134a247c5d49bd473840d365 100644 (file)
@@ -3,7 +3,7 @@
 namespace Org\Mxchange\CoreFramework\Filesystem\Pointer\Text;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\FileSystem\BaseFileIo;
+use Org\Mxchange\CoreFramework\Filesystem\BaseFileIo;
 use Org\Mxchange\CoreFramework\Filesystem\Pointer\OutputPointer;
 use Org\Mxchange\CoreFramework\Generic\NullPointerException;
 use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
@@ -17,7 +17,7 @@ use \SplFileInfo;
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2021 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -40,7 +40,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer
         *
         * @return      void
         */
-       protected function __construct () {
+       private function __construct () {
                // Call parent constructor
                parent::__construct(__CLASS__);
        }
@@ -60,7 +60,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer
                if (empty($mode)) {
                        // No filename given
                        throw new InvalidArgumentException('Parameter "mode" is empty');
-               } // END - if
+               }
 
                // Try to open a handler
                $fileObject = $fileInstance->openFile($mode);
@@ -69,7 +69,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer
                if ((is_null($fileObject)) || ($fileObject === false)) {
                        // Something bad happend
                        throw new FileIoException($fileInstance, self::EXCEPTION_FILE_POINTER_INVALID);
-               } // END - if
+               }
 
                // Create new instance
                $pointerInstance = new FrameworkTextFileOutputPointer();
@@ -86,10 +86,10 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer
         *
         * @param       $dataStream             The data stream we shall write to the file
         * @return      mixed                   Number of writes bytes or false on error
-        * @throws      NullPointerException    If the file pointer instance is not set by setPointer()
+        * @throws      NullPointerException    If the file pointer instance is not set by setFileObject()
         * @throws      LogicException  If there is no object being set
         */
-       public function writeToFile ($dataStream) {
+       public function writeToFile (string $dataStream) {
                if (is_null($this->getFileObject())) {
                        // Pointer not initialized
                        throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
@@ -110,7 +110,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer
         * @return      void
         * @throws      UnsupportedOperationException   If this method is called
         */
-       public function analyzeFile () {
+       public function analyzeFileStructure () {
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
@@ -122,7 +122,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer
         * @return      mixed                   Number of writes bytes or false on error
         * @throws      UnsupportedOperationException   If this method is called
         */
-       public function writeAtPosition ($seedPosition, $data) {
+       public function writeAtPosition (int $seedPosition, string $data) {
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }