Code

< 40 %
40-60 %
> 60 %
1
<?php
2
3
/*
4
 * This file is part of the Koded package.
5
 *
6
 * (c) Mihail Binev <[email protected]>
7
 *
8
 * Please view the LICENSE distributed with this source code
9
 * for the full copyright and license information.
10
 *
11
 */
12
13
namespace Koded\Http;
14
15
16
class FileStream extends Stream
17
{
18
    public function __construct(string $filename, string $mode = 'r')
19 7
    {
20
        parent::__construct(\fopen($filename, $mode));
21 7
    }
22 7
23
    public function getContents(): string
24 2
    {
25
        return stream_to_string($this);
26 2
    }
27
}
28