Quellcode durchsuchen

Added phpdoc to BrowserKit

Tim Nagel vor 14 Jahren
Ursprung
Commit
69672bad59

+ 35 - 0
src/Symfony/Component/BrowserKit/Client.php

@@ -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?

+ 5 - 0
src/Symfony/Component/BrowserKit/Response.php

@@ -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 = '';