@@ -174,7 +174,7 @@ class Loader
174
174
private $ Channels = [];
175
175
176
176
/**
177
- * @var int The default blocksize for readFileContent and readFileContentGZ .
177
+ * @var int The default blocksize for readFileGZ .
178
178
*/
179
179
private $ Blocksize = 131072 ;
180
180
@@ -349,7 +349,7 @@ public function __construct(
349
349
$ this ->Request ->ObjLoggerFile = $ this ->buildPath ($ this ->Configuration ['core ' ]['outbound_request_log ' ]);
350
350
}
351
351
$ ChannelsDataArray = [];
352
- $ this ->YAML ->process ($ this ->readFileContent ($ this ->AssetsPath . 'channels.yml ' ), $ ChannelsDataArray );
352
+ $ this ->YAML ->process ($ this ->readFile ($ this ->AssetsPath . 'channels.yml ' ), $ ChannelsDataArray );
353
353
$ this ->Request ->Channels = $ ChannelsDataArray ?: [];
354
354
unset($ ChannelsDataArray );
355
355
if (!isset ($ this ->Request ->Channels ['Triggers ' ])) {
@@ -447,28 +447,6 @@ public function __destruct()
447
447
restore_error_handler ();
448
448
}
449
449
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
-
472
450
/**
473
451
* Read byte value configuration directives as byte values.
474
452
*
@@ -915,7 +893,7 @@ public function substrAfterLast(string $Haystack, string $Needle): string
915
893
* @param string $File The path and the name of the file to read.
916
894
* @return string The file's content, or an empty string on failure.
917
895
*/
918
- public function readFileContent (string $ File ): string
896
+ public function readFile (string $ File ): string
919
897
{
920
898
/** Guard. */
921
899
if ($ File === '' || !is_file ($ File ) || !is_readable ($ File )) {
@@ -932,7 +910,7 @@ public function readFileContent(string $File): string
932
910
* @param string $File The file to read.
933
911
* @return string The file's content, or an empty string on failure.
934
912
*/
935
- public function readFileContentGZ (string $ File ): string
913
+ public function readFileGZ (string $ File ): string
936
914
{
937
915
/** Guard. */
938
916
if ($ File === '' || !is_file ($ File ) || !is_readable ($ File ) || !$ Filesize = filesize ($ File )) {
0 commit comments