@@ -31,11 +31,11 @@ use RicardoFiorani\Matcher\VideoServiceMatcher;
31
31
32
32
require __DIR__ . '/vendor/autoload.php';
33
33
34
- $vsd = new VideoServiceMatcher();
34
+ $vsm = new VideoServiceMatcher();
35
35
36
36
//Detects which service the url belongs to and returns the service's implementation
37
37
//of RicardoFiorani\Adapter\VideoAdapterInterface
38
- $video = $vsd ->parse('https://www.youtube.com/watch?v=PkOcm_XaWrw');
38
+ $video = $vsm ->parse('https://www.youtube.com/watch?v=PkOcm_XaWrw');
39
39
40
40
//Checks if service provides embeddable videos (most services does)
41
41
if ($video->isEmbeddable()) {
@@ -122,12 +122,12 @@ use RicardoFiorani\Matcher\VideoServiceMatcher;
122
122
123
123
require __DIR__ . '/vendor/autoload.php';
124
124
125
- $vsd = new VideoServiceMatcher();
125
+ $vsm = new VideoServiceMatcher();
126
126
127
127
//This is where the magic is done
128
- $vsd ->getServiceContainer()->setRenderer('MyOwnRenderer', 'MyVendor\\MyRenderer\\Factory\\MyOwnRendererFactory');
128
+ $vsm ->getServiceContainer()->setRenderer('MyOwnRenderer', 'MyVendor\\MyRenderer\\Factory\\MyOwnRendererFactory');
129
129
130
- $video = $vsd ->parse('https://www.youtube.com/watch?v=PkOcm_XaWrw');
130
+ $video = $vsm ->parse('https://www.youtube.com/watch?v=PkOcm_XaWrw');
131
131
132
132
//This will output "Hell yeah baby, you've rendered: http://www.youtube.com/embed/PkOcm_XaWrw"
133
133
echo $video->getEmbedCode(500,500);
0 commit comments