コード例 #1
0
 public function query()
 {
     $req = $this->newRequest('GET', new \peer\URL('http://localhost/?a=b'));
     $res = $this->newResponse(create(new Stylesheet())->withEncoding('iso-8859-1')->withOutputMethod('xml')->withTemplate($this->dumpParamsTemplate()));
     $s = new XMLScriptlet();
     $s->service($req, $res);
     $this->assertEquals(\peer\http\HttpConstants::STATUS_OK, $res->statusCode);
     $this->assertEquals('<?xml version="1.0" encoding="iso-8859-1"?>' . "\n" . "<html>\n  <body>state=static, page=home, lang=en_US, product=, sess=, query=a=b</body>\n</html>\n", $res->getContent());
 }
コード例 #2
0
 /**
  * Process request
  *
  * @param   scriptlet.xml.XMLScriptletRequest request 
  * @param   scriptlet.xml.XMLScriptletResponse response 
  */
 public function processRequest($request, $response)
 {
     if (false === $this->processWorkflow($request, $response)) {
         // The processWorkflow() method indicates no further processing
         // is to be done. Pass result "up".
         return false;
     }
     return parent::processRequest($request, $response);
 }