blob: ae3b4ef59b082e1d4e26dd2d21c56ecdb8b93ee6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<?php
namespace HTML5\Parser;
/**
* The FileInputStream loads a file to be parsed.
*
* @todo A buffered input stream would be useful.
*/
class FileInputStream extends StringInputStream implements InputStream {
/**
* Load a file input stream.
*
* @param string $data
* The file or url path to load.
*/
function __construct($data, $encoding = 'UTF-8', $debug = '') {
// Get the contents of the file.
$content = file_get_contents($data);
parent::__construct($content, $encoding, $debug);
}
}
|