summaryrefslogtreecommitdiff
path: root/lib/php-youtube-api/src/YoutubeServiceProviderLaravel4.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2025-04-08 02:24:30 +0200
committeremkael <emkael@tlen.pl>2025-04-08 02:24:30 +0200
commitaf150891df3b90fda846941d62ea76616f42a6ab (patch)
tree6363926d7f4a2fe09dc4d1b763b67fbb8d949c09 /lib/php-youtube-api/src/YoutubeServiceProviderLaravel4.php
parentaf2da903d47550cdf1d7eb2d7b5e5b972d847958 (diff)
Options for YT feeds: minimum video duration and extracting links from descriptionHEADmaster
Diffstat (limited to 'lib/php-youtube-api/src/YoutubeServiceProviderLaravel4.php')
-rw-r--r--lib/php-youtube-api/src/YoutubeServiceProviderLaravel4.php50
1 files changed, 50 insertions, 0 deletions
diff --git a/lib/php-youtube-api/src/YoutubeServiceProviderLaravel4.php b/lib/php-youtube-api/src/YoutubeServiceProviderLaravel4.php
new file mode 100644
index 0000000..cbe33ac
--- /dev/null
+++ b/lib/php-youtube-api/src/YoutubeServiceProviderLaravel4.php
@@ -0,0 +1,50 @@
+<?php
+
+namespace Madcoda\Youtube;
+
+use Config;
+use Madcoda\Youtube\Youtube;
+use Illuminate\Support\ServiceProvider;
+
+class YoutubeServiceProviderLaravel4 extends ServiceProvider
+{
+
+ /**
+ * Indicates if loading of the provider is deferred.
+ *
+ * @var bool
+ */
+ protected $defer = true;
+
+ /**
+ * Bootstrap the application events.
+ *
+ * @return void
+ */
+ public function boot()
+ {
+ $this->package('madcoda/php-youtube-api');
+ }
+
+ /**
+ * Register the service provider.
+ *
+ * @return void
+ */
+ public function register()
+ {
+ $this->app->bindShared('Madcoda\Youtube\Youtube', function ($app) {
+ return new Youtube($app['config']->get('php-youtube-api::youtube'));
+ });
+ }
+
+ /**
+ * Get the services provided by the provider.
+ *
+ * @return array
+ */
+ public function provides()
+ {
+ return array('Madcoda\Youtube\Youtube');
+ }
+}