getEndpoints example

$result = $xpath->query("//link[@type='application/$format+oembed']");
    return $result->length ? $result->item(0)->getAttribute('href') : FALSE;
  }

  /** * {@inheritdoc} */
  public function getProviderByUrl($url) {
    // Check the URL against every scheme of every endpoint of every provider     // until we find a match.     foreach ($this->providers->getAll() as $provider_info) {
      foreach ($provider_info->getEndpoints() as $endpoint) {
        if ($endpoint->matchUrl($url)) {
          return $provider_info;
        }
      }
    }

    $resource_url = $this->discoverResourceUrl($url);
    if ($resource_url) {
      return $this->resourceFetcher->fetchResource($resource_url)->getProvider();
    }

    
Home | Imprint | This part of the site doesn't use cookies.