_content = $content;
$this->_basePath = $basePath;
}
public function get_data($url)
{
if (!$url) {
return new FetchedDataURL($this->_content, array(), '');
} else {
//remove the "file:///" protocol
if (substr($url, 0, 8) == 'file:///') {
$url = substr($url, 8);
// remove the additional '/' that is currently inserted by utils_url.php
if (PHP_OS == "WINNT") {
$url = substr($url, 1);
}
}
return new FetchedDataURL(@file_get_contents(urldecode($url)), array(), '');
}
}
public function get_base_url()
{
return 'file:///' . $this->_basePath .'/dummy.html';
}
}