We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bea61aa commit 40b218dCopy full SHA for 40b218d
src/Adapters/Sassmeister.php
@@ -0,0 +1,32 @@
1
+<?php
2
+
3
+/**
4
+ * Adapter to generate embed code from SassMeister.
5
+ */
6
+namespace Embed\Adapters;
7
8
+use Embed\Request;
9
+use Embed\Utils;
10
11
+class Sassmeister extends Webpage implements AdapterInterface
12
+{
13
+ /**
14
+ * {@inheritdoc}
15
16
+ public static function check(Request $request)
17
+ {
18
+ return $request->isValid() && $request->match([
19
+ 'http://sassmeister.com/gist/*',
20
+ ]);
21
+ }
22
23
24
25
26
+ public function getCode()
27
28
+ $id = $this->request->getDirectoryPosition(1);
29
30
+ return Utils::iframe("http://embed.sassmeister.com/gist/{$id}");
31
32
+}
0 commit comments