'html' => false,
'title' => '',
'url' => '',
- 'content_type' => '',
+ 'headers' => [
+ 'content-type' => '',
+ ],
'language' => '',
]);
'html' => false,
'title' => '',
'url' => '',
- 'content_type' => '',
+ 'headers' => [
+ 'content-type' => '',
+ ],
'language' => '',
]);
'html' => false,
'title' => 'my title',
'url' => '',
- 'content_type' => '',
+ 'headers' => [
+ 'content-type' => '',
+ ],
'language' => '',
'status' => '',
'description' => 'desc',
'html' => "<h1>Test</h1><p><img src='http://3.3.3.3/cover.jpg'/></p>",
'title' => 'this is my title',
'url' => 'http://1.1.1.1',
- 'content_type' => 'text/html',
+ 'headers' => [
+ 'content-type' => 'text/html',
+ ],
'language' => 'fr',
'status' => '200',
- 'open_graph' => [
- 'og_title' => 'my OG title',
- 'og_description' => 'OG desc',
- 'og_image' => null,
- ],
+ 'image' => null,
]);
$proxy = new ContentProxy($graby, $tagger, $this->getValidator(), $this->getLogger(), $this->fetchingErrorMessage);
'html' => "<h1>Test</h1><p><img src='http://3.3.3.3/nevermind.jpg'/></p>",
'title' => 'this is my title',
'url' => 'http://1.1.1.1',
- 'content_type' => 'text/html',
+ 'headers' => [
+ 'content-type' => 'text/html',
+ ],
'language' => 'fr',
'status' => '200',
- 'open_graph' => [
- 'og_title' => 'my OG title',
- 'og_description' => 'OG desc',
- 'og_image' => 'http://3.3.3.3/cover.jpg',
- ],
+ 'image' => 'http://3.3.3.3/cover.jpg',
]);
$proxy = new ContentProxy($graby, $tagger, $this->getValidator(), $this->getLogger(), $this->fetchingErrorMessage);
'html' => str_repeat('this is my content', 325),
'title' => 'this is my title',
'url' => 'http://1.1.1.1',
- 'content_type' => 'text/html',
+ 'headers' => [
+ 'content-type' => 'text/html',
+ ],
'language' => 'fr',
'status' => '200',
'description' => 'OG desc',
'image' => 'https://',
- 'headers' => [
- 'content-type' => 'text/html',
- ],
]);
$proxy = new ContentProxy($graby, $tagger, $validator, $this->getLogger(), $this->fetchingErrorMessage);
'html' => false,
'title' => $actualTitle,
'url' => '',
- 'content_type' => 'text/html',
+ 'headers' => [
+ 'content-type' => 'text/html',
+ ],
'language' => '',
]);
'html' => false,
'title' => $actualTitle,
'url' => '',
- 'content_type' => 'text/html',
+ 'headers' => [
+ 'content-type' => 'text/html',
+ ],
'language' => '',
]);
'html' => false,
'title' => $actualTitle,
'url' => '',
- 'content_type' => 'application/pdf',
+ 'headers' => [
+ 'content-type' => 'application/pdf',
+ ],
'language' => '',
]);
'html' => false,
'title' => $actualTitle,
'url' => '',
- 'content_type' => 'application/pdf',
+ 'headers' => [
+ 'content-type' => 'application/pdf',
+ ],
'language' => '',
]);
'html' => false,
'title' => $actualTitle,
'url' => '',
- 'content_type' => 'application/pdf',
+ 'headers' => [
+ 'content-type' => 'application/pdf',
+ ],
'language' => '',
]);
'html' => false,
'title' => $actualTitle,
'url' => '',
- 'content_type' => 'application/pdf',
+ 'headers' => [
+ 'content-type' => 'application/pdf',
+ ],
'language' => '',
]);
'html' => false,
'title' => '',
'url' => $content_url,
- 'content_type' => '',
+ 'headers' => [
+ 'content-type' => '',
+ ],
'language' => '',
],
true
}
/**
- * https://stackoverflow.com/a/18506801.
+ * Convert hex to string.
+ *
+ * @see https://stackoverflow.com/a/18506801
*
* @param $hex
*