file_get_contents
symfony/var-dumper
Supported Versions: PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8
Reads entire file into a string
file_get_contents
(
string $filename
,
bool $use_include_path
=
false
,
?
resource $context
=
null
,
int $offset
=
0
,
?
int $length
=
null
):
string
|
false
}
}
if (
$srcKey
==
$f
[
'file'
]) {
$src
=
self
::
extractSource
(
file_get_contents
(
$f
[
'file'
]),
$f
[
'line'
],
self
::
$srcContext
,
'php'
,
$f
[
'file'
],
$f
);
$srcKey
.=
':'
.
$f
[
'line'
];
if (
$ellipsis
) {
$ellipsis
+=
1
+
\strlen
(
$f
[
'line'
]);
Caster/ExceptionCaster.php
public function
describe
(
OutputInterface $output
,
Data $data
, array
$context
,
int $clientId
):
void
{
if (!
$this
->
initialized
) {
$styles
=
file_get_contents
(
__DIR__
.
'/../../Resources/css/htmlDescriptor.css'
);
$scripts
=
file_get_contents
(
__DIR__
.
'/../../Resources/js/htmlDescriptor.js'
);
$output
->
writeln
(
"<style>
$styles
</style><script>
$scripts
</script>"
);
$this
->
initialized
=
true
;
Command/Descriptor/HtmlDescriptor.php
{
if (!
$this
->
initialized
) {
$styles
=
file_get_contents
(
__DIR__
.
'/../../Resources/css/htmlDescriptor.css'
);
$scripts
=
file_get_contents
(
__DIR__
.
'/../../Resources/js/htmlDescriptor.js'
);
$output
->
writeln
(
"<style>
$styles
</style><script>
$scripts
</script>"
);
$this
->
initialized
=
true
;
}
Command/Descriptor/HtmlDescriptor.php
private function
getServerProcess
():
Process
{
$process
= new
PhpProcess
(
file_get_contents
(
__DIR__
.
'/../Fixtures/dump_server.php'
),
null
, [
'COMPONENT_ROOT'
=>
__DIR__
.
'/../../'
,
'VAR_DUMPER_SERVER'
=>
self
::
VAR_DUMPER_SERVER
,
]);
Tests/Dumper/ServerDumperTest.php
private function
getServerProcess
():
Process
{
$process
= new
PhpProcess
(
file_get_contents
(
__DIR__
.
'/../Fixtures/dump_server.php'
),
null
, [
'COMPONENT_ROOT'
=>
__DIR__
.
'/../../'
,
'VAR_DUMPER_SERVER'
=>
self
::
VAR_DUMPER_SERVER
,
]);
Tests/Server/ConnectionTest.php