Show
Ignore:
Timestamp:
03/29/08 21:35:39 (7 months ago)
Author:
mikey
Message:

added unit test for net::stubbles::ipo.response::stubBaseResponse
added possibility to set the status code for the response
added possibility to set the http version

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/ipo/response/stubResponse.php

    r1223 r1471  
    2323     */ 
    2424    public function clear(); 
    25      
     25 
     26    /** 
     27     * sets the http version 
     28     * 
     29     * The version should be a string like '1.0' or '1.1'. 
     30     * 
     31     * @param  string  $version 
     32     */ 
     33    public function setVersion($version); 
     34 
     35    /** 
     36     * returns the http version 
     37     * 
     38     * @return  string 
     39     */ 
     40    public function getVersion(); 
     41 
     42    /** 
     43     * sets the status code to be send 
     44     * 
     45     * This needs only to be done if another status code then the default one 
     46     * should be send. 
     47     * 
     48     * @param  int  $statusCode 
     49     */ 
     50    public function setStatusCode($statusCode); 
     51 
     52    /** 
     53     * returns status code to be send 
     54     * 
     55     * If return value is <null> the default one will be send. 
     56     * 
     57     * @return  int 
     58     */ 
     59    public function getStatusCode(); 
     60 
    2661    /** 
    2762     * add a header to the response 
     
    3166     */ 
    3267    public function addHeader($name, $value); 
    33      
     68 
    3469    /** 
    3570     * returns the list of headers 
     
    3873     */ 
    3974    public function getHeaders(); 
    40      
     75 
    4176    /** 
    4277     * add a cookie to the response 
     
    4580     */ 
    4681    public function setCookie(stubCookie $cookie); 
    47      
     82 
    4883    /** 
    4984     * returns the list of cookies 
    5085     * 
    51      * @return  array<stubCookie> 
     86     * @return  array<string,stubCookie> 
    5287     */ 
    5388    public function getCookies(); 
    54      
     89 
    5590    /** 
    5691     * write data into the response 
     
    5994     */ 
    6095    public function write($data); 
    61      
     96 
    6297    /** 
    6398     * returns the data written so far 
     
    66101     */ 
    67102    public function getData(); 
    68      
     103 
    69104    /** 
    70105     * replaces the data written so far with the new data 
     
    73108     */ 
    74109    public function replaceData($data); 
    75      
     110 
    76111    /** 
    77112     * send the response out