parse() public method

Reads the raw content and send events into the page to be built.
public parse ( $response ) : SimplePage
$response SimpleHttpResponse Fetched response.
return SimplePage Newly parsed page.
コード例 #1
0
ファイル: parsing_test.php プロジェクト: ngugijames/ThinkUp
 function whenVisiting($url, $content)
 {
     $response = new MockSimpleHttpResponse();
     $response->setReturnValue('getContent', $content);
     $response->setReturnValue('getUrl', new SimpleUrl($url));
     $builder = new SimplePhpPageBuilder();
     return $builder->parse($response);
 }