Phalcon\Test\Proxy\Http\Response::setDI PHP Method

setDI() public method

public setDI ( Phalcon\DiInterface $di )
$di Phalcon\DiInterface
    public function setDI(DiInterface $di)
    {
        parent::setDI($di);
    }

Usage Example

Beispiel #1
0
 /**
  * Initializes the response object and returns it
  *
  * @author Nikolaos Dimopoulos <*****@*****.**>
  * @since  2014-10-05
  *
  * @return Response
  */
 protected function getResponseObject()
 {
     Di::reset();
     $di = new Di();
     $di->set('url', function () {
         $url = new Url();
         $url->setBaseUri('/');
         return $url;
     });
     $response = new Response();
     $response->setDI($di);
     return $response;
 }