__construct() public method

Create a new service provider instance.
public __construct ( Illuminate\Contracts\Foundation\Application $app ) : void
$app Illuminate\Contracts\Foundation\Application
return void
示例#1
0
 /**
  * Crea a new instance of console
  *
  * @param string $basePath
  */
 public function __construct($basePath)
 {
     parent::__construct(new Application($basePath));
     $this->input = new ArgvInput();
     $this->output = new ConsoleOutput();
     $this->config = $this->getConfiguration($basePath);
 }
 public function __construct($app)
 {
     parent::__construct($app);
     $this->houseModel = new House();
     $this->projectModel = new Project();
     $this->designModel = new Design();
 }
 public function __construct($app)
 {
     ClassLoader::addDirectories(array(base_path() . DIRECTORY_SEPARATOR . 'userfiles' . DIRECTORY_SEPARATOR . 'modules', __DIR__));
     ClassLoader::register();
     spl_autoload_register(array($this, 'autoloadModules'));
     parent::__construct($app);
 }
 /**
  * Create a new service provider instance.
  *
  * @param \Illuminate\Contracts\Foundation\Application $app
  */
 public function __construct($app)
 {
     parent::__construct($app);
     $this->app->singleton('flare', function ($app) {
         return $app->make(\LaravelFlare\Flare\Flare::class, [$app]);
     });
 }
 /**
  * Create a new service provider instance.
  *
  * @param Application $app
  *
  * @throws LackOfCoffeeException
  */
 public function __construct(Application $app)
 {
     parent::__construct($app);
     if ($this->defer === null) {
         throw new LackOfCoffeeException('Please define whether this provider should be deferred or not.');
     }
 }
 /**
  * Service provider constructor method.
  *
  * @param \Illuminate\Support\Facades\App $app
  * @return void
  */
 public function __construct($app)
 {
     parent::__construct($app);
     $this->providers = config('locality.providers', []);
     $this->aliases = config('locality.aliases', []);
     $this->aliasLoader = AliasLoader::getInstance();
 }
示例#7
0
 /**
  * The constructor.
  *
  * @param Application $app
  * @param string      $name
  * @param string      $path
  */
 public function __construct(Application $app, $name, $path)
 {
     parent::__construct($app);
     $this->setName($name);
     $this->setPath(realpath($path));
     $this->setDispatcher($app['events']);
 }
 public function __construct(Application $app, Router $router, View $view)
 {
     parent::__construct($app);
     $this->app = $app;
     $this->router = $router;
     $this->view = $view;
 }
 /**
  * Create a new service provider instance.
  *
  * @param  \Illuminate\Contracts\Foundation\Application  $app
  */
 public function __construct($app)
 {
     parent::__construct($app);
     $appVersion = method_exists($app, 'version') ? $app->version() : $app::VERSION;
     $this->isLumen = str_contains($appVersion, 'Lumen');
     $this->isLaravel4 = (int) $appVersion == 4;
     $this->isLaravel5 = (int) $appVersion == 5;
 }
 public function __construct($app)
 {
     $this->merchantId = config('services.mpay24.merchantId');
     $this->password = config('services.mpay24.password');
     $this->testMode = config('services.mpay24.test', false);
     $this->debugMode = config('services.mpay24.debug', false);
     parent::__construct($app);
 }
示例#11
0
 public function __construct($app)
 {
     parent::__construct($app);
     if (!$this->app->resolved('Mvalim\\PackageUtils\\Container')) {
         $this->app->singleton('Mvalim\\PackageUtils\\Container', function () use($app) {
             return new Container($app);
         });
     }
 }
 public function __construct($app)
 {
     if (method_exists($app, 'configure')) {
         // @codeCoverageIgnoreStart
         $app->configure('oauth2');
         // @codeCoverageIgnoreEnd
     }
     $this->options = $app->make('config')->get('oauth2');
     parent::__construct($app);
 }
示例#13
0
 /**
  * Create do provider.
  *
  * @param \Illuminate\Contracts\Foundation\Application $app
  */
 public function __construct($app)
 {
     parent::__construct($app);
     // Trocar instancias
     foreach ($this->instances as $provider => $classServiceProvider) {
         // Limpar facade
         Facade::clearResolvedInstance($provider);
         // Trocar / Criar
         $this->app->instance($provider, new $classServiceProvider($app));
     }
 }
 public function __construct(\Illuminate\Contracts\Foundation\Application $app, $extension)
 {
     parent::__construct($app);
     $this->extension = $extension;
     foreach ($this->getCollectedCalls() as $call) {
         if ($this->isDefered($call['method'])) {
             continue;
         }
         call_user_func_array([$this, $call['method']], $call['args']);
     }
 }
 /**
  * Construct a new GenericServiceProvider.
  *
  * If $provisions and $namespace are set, $namespace should be the the one
  * the main service class is located in, and $provisions should consist
  * of the names of any services in that directory that need to be bound.
  *
  * Example:
  *
  * If we have:
  *
  * My\Namespaced\ExampleClass
  *
  * and
  *
  * My\Namespaced\Interfaces\ExampleClassInterface
  *
  * then the following assignments would automatically bind the interface
  * to the implementation in My\Namespaced\ExampleServiceProvider:
  *
  * protected $namespace = __NAMESPACE__;
  * protected $provisions = ['ExampleClass'];
  *
  * @param \Illuminate\Foundation\Application $app
  */
 public function __construct($app)
 {
     parent::__construct($app);
     if (isset($this->provisions) && isset($this->namespace)) {
         foreach ($this->provisions as $provision) {
             $baseNamespace = $this->namespace . "\\";
             $interface = $baseNamespace . "Interfaces\\" . $provision . "Interface";
             $class = $baseNamespace . $provision;
             $this->bindings[$interface] = $class;
         }
     }
 }
示例#16
0
 /**
  * @param Application $app
  * @param string $name
  */
 public function __construct(Application $app, $name)
 {
     parent::__construct($app);
     $this->app = $app;
     $this->name = $name;
     $provider =& $this;
     $this->app->booting(function () use($provider) {
         $namespace = str_replace('/', '.', $this->name);
         $provider->loadViewsFrom([base_path('resources/views/' . $this->name), $provider->getResourcePath('views')], $namespace);
         $provider->loadTranslationsFrom([base_path('resources/lang/' . $this->name), $provider->getResourcePath('lang')], $namespace);
     });
 }
 public function __construct($app)
 {
     parent::__construct($app);
     /*        
     ===
     Uncomment this is you to use routes.php file
     ===
     if (!\App::runningInConsole()){
         \Event::listen('routes.before', function(){
             include __DIR__.'/../../routes.php';
         });
     } 
     */
 }
 /**
  * @param \Illuminate\Contracts\Foundation\Application $app
  */
 public function __construct($app)
 {
     // detect site section and make its service provider and import
     /** @var AppSiteLoaderInterface|AppSiteLoader $className */
     foreach ($this->additionalSectionLoaderClasses as $className) {
         if ($className::canBeUsed()) {
             static::$siteLoader = new $className($this, $app);
             break;
         }
     }
     if (static::$siteLoader === null) {
         if ($this->consoleSectionLoaderClass !== null && \App::runningInConsole()) {
             $className = $this->consoleSectionLoaderClass;
         } else {
             $className = $this->defaultSectionLoaderClass;
         }
         static::$siteLoader = new $className($this, $app);
     }
     parent::__construct($app);
 }
 /**
  * Create a new service provider instance
  * 
  * @param \Illuminate\Contracts\Foundation\Application $app
  */
 public function __construct($app)
 {
     parent::__construct($app);
     $this->packageDir = dirname(__DIR__);
 }
 /**
  * Create a new service provider instance.
  *
  * @param \Illuminate\Contracts\Foundation\Application $app
  * @return void
  */
 public function __construct($app)
 {
     parent::__construct($app);
     $this->provider = $this->getProvider();
 }
 public function __construct($app)
 {
     parent::__construct($app);
     $this->redirect = $this->app->make('redirect');
     $this->session = $this->app->make('session');
 }
示例#22
0
 public function __construct($app)
 {
     parent::__construct($app);
     $this->configPath = __DIR__ . '/../../config/osm.php';
 }
 /**
  * @inheritdoc
  * @param \Illuminate\Contracts\Foundation\Application $application
  */
 public function __construct($application)
 {
     $this->configLocation = __DIR__ . '/../config/culpa.php';
     parent::__construct($application);
 }
示例#24
0
 public function __construct($app)
 {
     parent::__construct($app);
     require_once __DIR__ . '/../../handlers/ExceptionHandler.php';
 }
示例#25
0
 /**
  * Extension constructor.
  *
  * @param \Illuminate\Contracts\Foundation\Application $app
  */
 public function __construct(Application $app)
 {
     parent::__construct($app);
     $this->events = $app['events'];
     $this->router = $app['router'];
 }
示例#26
0
 /**
  * @param \Illuminate\Contracts\Foundation\Application $app
  */
 public function __construct(Application $app)
 {
     //$this->finder = new AnnotationFinder($app);
     parent::__construct($app);
 }
 /**
  * ExtensionServiceProvider constructor.
  *
  * @param \Notadd\Foundation\Application $application
  */
 public function __construct($application)
 {
     parent::__construct($application);
     static::$complies = new Collection();
 }
 public function __construct($app, Capsule $capsule)
 {
     $this->capsule = $capsule;
     $this->conf = (object) (include_once app_path('config/db.php'));
     parent::__construct($app);
 }
 /**
  * {@inheritDoc}
  */
 public function __construct($app)
 {
     $this->defer = false;
     parent::__construct($app);
 }
 /**
  * Instantiate the service provider
  *
  * @param mixed $app
  * @return void
  */
 public function __construct($app)
 {
     parent::__construct($app);
 }