Added phpdoc to BrowserKit

This commit is contained in:
Tim Nagel 2011-02-06 13:10:40 -08:00 committed by Fabien Potencier
parent b9ed739d75
commit 69672bad59
2 changed files with 40 additions and 0 deletions

View File

@ -266,16 +266,39 @@ abstract class Client
// @codeCoverageIgnoreEnd
}
/**
* Filters the request
*
* @param Request The request to filter
*
* @return Request
*/
protected function filterRequest(Request $request)
{
return $request;
}
/**
* Filters the Response
*
* @param Response The Response to filter
*
* @return Response
*/
protected function filterResponse($response)
{
return $response;
}
/**
* Creates a crawler
*
* @param string A uri
* @param string Content for the crawler to use
* @param string Content type
*
* @return Crawler
*/
protected function createCrawlerFromContent($uri, $content, $type)
{
$crawler = new Crawler(null, $uri);
@ -286,6 +309,8 @@ abstract class Client
/**
* Goes back in the browser history.
*
* @return Crawler
*/
public function back()
{
@ -294,6 +319,8 @@ abstract class Client
/**
* Goes forward in the browser history.
*
* @return Crawler
*/
public function forward()
{
@ -302,6 +329,8 @@ abstract class Client
/**
* Reloads the current browser.
*
* @return Crawler
*/
public function reload()
{
@ -335,6 +364,12 @@ abstract class Client
$this->history->clear();
}
/**
* Takes a URI and converts it to absolute if it is not already absolute.
*
* @param string A uri
* @return string An absolute uri
*/
protected function getAbsoluteUri($uri)
{
// already absolute?

View File

@ -39,6 +39,11 @@ class Response
$this->headers = $headers;
}
/**
* Converts the response object to string containing all headers and the response content
*
* @return string The response with headers and content
*/
public function __toString()
{
$headers = '';