Explorar o código

agregue metodo

Luciano Andrade %!s(int64=7) %!d(string=hai) anos
pai
achega
749b493bc1
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  1. 9 0
      Services/Webservice.php

+ 9 - 0
Services/Webservice.php

@@ -264,6 +264,15 @@ class Webservice
         return array("error" => "Webservice({$webservice}) not found.");
     }
 
+    public function buildUrlForId($ws,$id = null, $extra= null){
+        $url = $this->serviceContainer->getParameter($ws);
+        if(!is_null($id)){
+                $url = str_replace(".json", "/{$id}", $url);
+        }
+        return $url . $extra;
+
+    }
+
     /**
      * @return ContainerInterface
      */