You are here

private function HtmlAssetInliner::getContents in TMGMT Translator Smartling 8

Gets content for given url

Parameters

$url:

Return value

string

1 call to HtmlAssetInliner::getContents()
HtmlAssetInliner::imageToDataUri in src/Context/HtmlAssetInliner.php
Converts images from <img> tags to data URIs

File

src/Context/HtmlAssetInliner.php, line 299

Class

HtmlAssetInliner

Namespace

Drupal\tmgmt_smartling\Context

Code

private function getContents($url) {
  $data = @file_get_contents($url);
  if ($data) {
    return $data;
  }
  return @file_get_contents(trim($url));
}