Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 22... Línea 22...
22
     * @param JsonBody $jsonFormatter Optional JSON formatter to use
22
     * @param JsonBody $jsonFormatter Optional JSON formatter to use
23
     */
23
     */
24
    public function __construct(
24
    public function __construct(
25
        Service $api,
25
        Service $api,
26
        $endpoint,
26
        $endpoint,
27
        JsonBody $jsonFormatter = null
27
        ?JsonBody $jsonFormatter = null
28
    ) {
28
    ) {
29
        parent::__construct($api, $endpoint);
29
        parent::__construct($api, $endpoint);
30
        $this->contentType = JsonBody::getContentType($api);
30
        $this->contentType = JsonBody::getContentType($api);
31
        $this->jsonFormatter = $jsonFormatter ?: new JsonBody($api);
31
        $this->jsonFormatter = $jsonFormatter ?: new JsonBody($api);
32
    }
32
    }