PluginProbe
EmbedPress – PDF Embedder, 3D PDF FlipBook, Google Reviews, YouTube Videos, Upload & Embed PDF documents / 4.4.4
EmbedPress – PDF Embedder, 3D PDF FlipBook, Google Reviews, YouTube Videos, Upload & Embed PDF documents v4.4.4
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 / Genially.php
Genially.php
54 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 * Genially.php
4 *
5 * @package Embera
6 * @author Matías Minevitz <matias.minevitz@gmail.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Embera\Provider;
13
14 use Embera\Url;
15
16 /**
17 * Genially Provider
18 * Engage your audience with clickable, gamified, media-rich experiences. Create your interactive content now!
19 *
20 * @link https://genially.com
21 */
22 class Genially extends ProviderAdapter implements ProviderInterface
23 {
24 /** inline {@inheritdoc} */
25 protected $endpoint = 'https://genially.com/services/oembed?format=json';
26
27 /** inline {@inheritdoc} */
28 protected static $hosts = [
29 '*.genial.ly',
30 '*.genially.com',
31 ];
32
33 /** inline {@inheritdoc} */
34 protected $httpsSupport = true;
35
36 /** inline {@inheritdoc} */
37 protected $responsiveSupport = true;
38
39 /** inline {@inheritdoc} */
40 public function validateUrl(Url $url)
41 {
42 return (bool) (preg_match('~view\.(?:genial\.ly|genially\.com)/[a-z0-9]{24}(?:$|/)~i', (string) $url));
43 }
44
45 /** inline {@inheritdoc} */
46 public function normalizeUrl(Url $url)
47 {
48 $url->convertToHttps();
49 $url->removeQueryString();
50
51 return $url;
52 }
53 }
54