本文整理匯總了PHP中BufferedReader::open方法的典型用法代碼示例。如果您正苦於以下問題:PHP BufferedReader::open方法的具體用法?PHP BufferedReader::open怎麽用?PHP BufferedReader::open使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BufferedReader
的用法示例。
在下文中一共展示了BufferedReader::open方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: parse
/**
* Creates the ExpatParser, sets root handler and kick off parsing
* process.
*
* @throws BuildException if there is any kind of execption during
* the parsing process
* @access private
*/
protected function parse()
{
try {
$reader = new BufferedReader(new FileReader($this->buildFile));
$reader->open();
$parser = new ExpatParser($reader);
$parser->parserSetOption(XML_OPTION_CASE_FOLDING, 0);
$parser->setHandler(new RootHandler($parser, $this));
$this->project->log("parsing buildfile " . $this->buildFile->getName(), PROJECT_MSG_VERBOSE);
$parser->parse();
$reader->close();
} catch (Exception $exc) {
throw new BuildException("Error reading project file", $exc);
}
}