PluginProbe
EmbedPress – PDF Embedder, 3D PDF FlipBook, Google Reviews, YouTube Videos, Upload & Embed PDF documents / 4.5.5
EmbedPress – PDF Embedder, 3D PDF FlipBook, Google Reviews, YouTube Videos, Upload & Embed PDF documents v4.5.5
4.6.5 4.6.4 4.6.3 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 All 189 releases
embedpress / vendor / wpdevelopers / embera / src / Embera / Provider / Render.php
Render.php
57 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Render.php
4 *
5 * @package Embera
6 * @author Michael Pratt <yo@michael-pratt.com>
7 * @link http://www.michael-pratt.com/
8 *
9 * For the full copyright and license information, please view the LICENSE
10 * file that was distributed with this source code.
11 */
12
13 namespace Embera\Provider;
14
15 use Embera\Url;
16
17 /**
18 * Render Provider
19 *
20 * @link https://*.onrender.com
21 */
22 class Render extends ProviderAdapter implements ProviderInterface
23 {
24 /** inline {@inheritdoc} */
25 protected $endpoint = 'https://og-demo.onrender.com/oembed?format=json';
26
27 /** inline {@inheritdoc} */
28 protected static $hosts = [
29 '*.onrender.com'
30 ];
31
32 /** inline {@inheritdoc} */
33 protected $allowedParams = [ 'maxwidth', 'maxheight' ];
34
35 /** inline {@inheritdoc} */
36 protected $httpsSupport = true;
37
38 /** inline {@inheritdoc} */
39 protected $responsiveSupport = false;
40
41 /** inline {@inheritdoc} */
42 public function validateUrl(Url $url)
43 {
44 return (bool) (preg_match('~([^\.]+)\.onrender\.com/([^/]+)~i', (string) $url));
45 }
46
47 /** inline {@inheritdoc} */
48 public function normalizeUrl(Url $url)
49 {
50 $url->convertToHttps();
51 $url->removeQueryString();
52 $url->removeLastSlash();
53
54 return $url;
55 }
56 }
57