X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Ffile_directories%2Fio_stream%2Fclass_FileIoStream.php;h=ae0f6352a8ba6ada1e392c0d850165eda510e680;hp=827bd9d80a31370570ca62cc3b5f6a77c6bcb36c;hb=b002c5909aa0f781505dde5414964b0f014cde01;hpb=78a010fef84895720e796842208f01dfb619c332 diff --git a/framework/main/classes/file_directories/io_stream/class_FileIoStream.php b/framework/main/classes/file_directories/io_stream/class_FileIoStream.php index 827bd9d8..ae0f6352 100644 --- a/framework/main/classes/file_directories/io_stream/class_FileIoStream.php +++ b/framework/main/classes/file_directories/io_stream/class_FileIoStream.php @@ -1,12 +1,18 @@ __toString() . ' with message: ' . $e->getMessage()); + ApplicationEntryPoint::exitApplication('The application has made a fatal error. Exception: ' . $e->__toString() . ' with message: ' . $e->getMessage()); } } // END - for @@ -139,11 +145,11 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil /** * Reads from a local file * - * @param $fqfn The full-qualified file-name which we shall load + * @param $infoInstance An instance of a SplFileInfo class * @return $array An array with the element 'header' and 'data' * @see FileInputStreamer */ - public final function loadFileContents ($fqfn) { + public final function loadFileContents (SplFileInfo $infoInstance) { // Initialize some variables and arrays $inputBuffer = ''; $lastBuffer = ''; @@ -152,7 +158,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil $readData = ''; // This will contain our read data // Get a file input handler - $fileInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_class', array($fqfn)); + $fileInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_class', array($infoInstance)); // Read all it's contents (we very and transparently decompress it below) while ($readRawLine = $fileInstance->readFromFile()) {