Ejemplo n.º 1
0
 public function encodeRequest(\fpoirotte\XRL\Request $request)
 {
     $writer = $this->getWriter();
     $writer->startElement('methodCall');
     $writer->writeElement('methodName', $request->getProcedure());
     if (count($request->getParams())) {
         $writer->startElement('params');
         foreach ($request->getParams() as $param) {
             $writer->startElement('param');
             $writer->startElement('value');
             $param->write($writer, $this->timezone, $this->stringTag);
             $writer->endElement();
             $writer->endElement();
         }
         $writer->endElement();
     }
     $writer->endElement();
     $result = $this->finalizeWrite($writer);
     return $result;
 }
Ejemplo n.º 2
0
 public function encodeRequest(\fpoirotte\XRL\Request $request)
 {
     $newParams = array_map('static::convert', $request->getParams());
     return $this->encoder->encodeRequest(new \fpoirotte\XRL\Request($request->getProcedure(), $newParams));
 }