码迷,mamicode.com
首页 > Web开发 > 详细

[李景山php]每天laravel-20160924|PiplineServiceProvider.php

时间:2016-07-23 21:36:37      阅读:245      评论:0      收藏:0      [点我收藏+]

标签:laravel

<?php

namespace Illuminate\Pipeline;

use Illuminate\Support\ServiceProvider;
// namespace like Service Provider
class PipelineServiceProvider extends ServiceProvider
{// all this Service Provider
   //this is a pipeline Service Provider
    /**
     * Indicates if loading of the provider is deferred.
     *
     * @var bool
     */
    protected $defer = true;// just like a parents
   // Indicates if loading of the provider is deferred.

    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        $this->app->singleton(
            ‘Illuminate\Contracts\Pipeline\Hub‘, ‘Illuminate\Pipeline\Hub‘
        );// singleton method
    }//Register the service provider.

    /**
     * Get the services provided by the provider.
     *
     * @return array
     */
    public function provides()
    {
        return [
            ‘Illuminate\Contracts\Pipeline\Hub‘,
        ];// return this
    }//Get the services provided by the provider.
}


本文出自 “专注php” 博客,请务必保留此出处http://jingshanls.blog.51cto.com/3357095/1829008

[李景山php]每天laravel-20160924|PiplineServiceProvider.php

标签:laravel

原文地址:http://jingshanls.blog.51cto.com/3357095/1829008

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!