Codebase list php-embed / 99f6ae6
Update upstream source from tag 'upstream/3.3.9' Update to upstream version '3.3.9' with Debian dir 6d76f0b48d004f31ee3b35117364519224488562 Dominik George 5 years ago
7 changed file(s) with 21 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
99 use Embed\Http\Url;
1010 use Embed\Providers\Provider;
1111 use Embed\Utils;
12 use Exception;
1213
1314 /**
1415 * Base class extended by all adapters.
316317 return $this->getFirstFromProviders(function (Provider $provider) use ($blacklist, $homeUrl) {
317318 $url = $provider->getUrl();
318319
319 if ($homeUrl === $url || (!empty($blacklist) && Url::create($url)->match($blacklist))) {
320 try {
321 if ($homeUrl === $url || (!empty($blacklist) && Url::create($url)->match($blacklist))) {
322 return false;
323 }
324 } catch (Exception $error) {
320325 return false;
321326 }
322327
2727 'image/png' => ['photo', 'imageHtml'],
2828 'image/bmp' => ['photo', 'imageHtml'],
2929 'image/ico' => ['photo', 'imageHtml'],
30 'image/webp' => ['photo', 'imageHtml'],
3031 'text/rtf' => ['rich', 'google'],
3132 'application/pdf' => ['rich', 'google'],
3233 'application/msword' => ['rich', 'google'],
539539 foreach ((array) $query as $key => $value) {
540540 $this->info['query'][hex2bin($key)] = $value;
541541 }
542
543 array_walk_recursive($this->info['query'], function (&$value) {
544 $value = urldecode($value);
545 });
546542 }
547543
548544 /**
623619 private static function getSuffixes()
624620 {
625621 if (self::$public_suffix_list === null) {
626 self::$public_suffix_list = include __DIR__.'/../resources/public_suffix_list.php';
627 }
628
622 self::$public_suffix_list = (@include __DIR__.'/../resources/public_suffix_list.php') ?: [];
623 }
624
629625 return self::$public_suffix_list;
630626 }
631627
99 'instagram.com/p/*',
1010 'www.instagram.com/p/*',
1111 ];
12 protected static $endPoint = 'http://api.instagram.com/oembed';
12 protected static $endPoint = 'https://api.instagram.com/oembed';
1313
1414 /**
1515 * {@inheritdoc}
0 <?php
1
2 namespace Embed\Providers\OEmbed;
3
4 class Poll extends Polldaddy
5 {
6 protected static $pattern = 'poll.fm/*';
7 }
44 class Polldaddy extends EndPoint implements EndPointInterface
55 {
66 protected static $pattern = 'polldaddy.com/poll/*';
7 protected static $endPoint = 'http://polldaddy.com/oembed';
7 protected static $endPoint = 'https://api.crowdsignal.com/oembed';
88 }
44 class Soundcloud extends EndPoint implements EndPointInterface
55 {
66 protected static $pattern = 'soundcloud.com/*';
7 protected static $endPoint = 'http://soundcloud.com/oembed';
7 protected static $endPoint = 'https://soundcloud.com/oembed';
88 }