@@ -174,7 +174,7 @@ class Loader
174174 private $ Channels = [];
175175
176176 /**
177- * @var int The default blocksize for readFileContent and readFileContentGZ .
177+ * @var int The default blocksize for readFileGZ .
178178 */
179179 private $ Blocksize = 131072 ;
180180
@@ -349,7 +349,7 @@ public function __construct(
349349 $ this ->Request ->ObjLoggerFile = $ this ->buildPath ($ this ->Configuration ['core ' ]['outbound_request_log ' ]);
350350 }
351351 $ ChannelsDataArray = [];
352- $ this ->YAML ->process ($ this ->readFileContent ($ this ->AssetsPath . 'channels.yml ' ), $ ChannelsDataArray );
352+ $ this ->YAML ->process ($ this ->readFile ($ this ->AssetsPath . 'channels.yml ' ), $ ChannelsDataArray );
353353 $ this ->Request ->Channels = $ ChannelsDataArray ?: [];
354354 unset($ ChannelsDataArray );
355355 if (!isset ($ this ->Request ->Channels ['Triggers ' ])) {
@@ -447,28 +447,6 @@ public function __destruct()
447447 restore_error_handler ();
448448 }
449449
450- /**
451- * Returns the content of the specified file (should only use for
452- * reasonably small files).
453- *
454- * @param string $File The file to read.
455- * @return string The file's content or an empty string on failure.
456- */
457- public function readFile (string $ File ): string
458- {
459- /** Guard. */
460- if (!is_file ($ File ) || !is_readable ($ File ) || !$ Filesize = filesize ($ File )) {
461- return '' ;
462- }
463-
464- if (!is_resource ($ Handle = fopen ($ File , 'rb ' ))) {
465- return '' ;
466- }
467- $ Data = fread ($ Handle , $ Filesize );
468- fclose ($ Handle );
469- return $ Data ;
470- }
471-
472450 /**
473451 * Read byte value configuration directives as byte values.
474452 *
@@ -915,7 +893,7 @@ public function substrAfterLast(string $Haystack, string $Needle): string
915893 * @param string $File The path and the name of the file to read.
916894 * @return string The file's content, or an empty string on failure.
917895 */
918- public function readFileContent (string $ File ): string
896+ public function readFile (string $ File ): string
919897 {
920898 /** Guard. */
921899 if ($ File === '' || !is_file ($ File ) || !is_readable ($ File )) {
@@ -932,7 +910,7 @@ public function readFileContent(string $File): string
932910 * @param string $File The file to read.
933911 * @return string The file's content, or an empty string on failure.
934912 */
935- public function readFileContentGZ (string $ File ): string
913+ public function readFileGZ (string $ File ): string
936914 {
937915 /** Guard. */
938916 if ($ File === '' || !is_file ($ File ) || !is_readable ($ File ) || !$ Filesize = filesize ($ File )) {
0 commit comments