OCA\Richdocuments\Controller\DocumentController::getWopiSrcUrl PHP Метод

getWopiSrcUrl() приватный Метод

private getWopiSrcUrl ( $discovery_parsed, string $mimetype )
$mimetype string
    private function getWopiSrcUrl($discovery_parsed, $mimetype)
    {
        if (is_null($discovery_parsed) || $discovery_parsed == false) {
            return null;
        }
        $result = $discovery_parsed->xpath(sprintf('/wopi-discovery/net-zone/app[@name=\'%s\']/action', $mimetype));
        if ($result && count($result) > 0) {
            return array('urlsrc' => (string) $result[0]['urlsrc'], 'action' => (string) $result[0]['name']);
        }
        return null;
    }