当前位置: 首页>>代码示例>>PHP>>正文


PHP Container::call方法代码示例

本文整理汇总了PHP中Illuminate\Container\Container::call方法的典型用法代码示例。如果您正苦于以下问题:PHP Container::call方法的具体用法?PHP Container::call怎么用?PHP Container::call使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Container\Container的用法示例。


在下文中一共展示了Container::call方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: call

 /**
  * Call the given seeder.
  *
  * @param  \Closure|string  $seeder
  * @return void
  */
 protected function call($seeder)
 {
     if ($seeder instanceof Closure) {
         return $this->container->call($seeder);
     }
     $this->container->call($seeder, [], 'seed');
 }
开发者ID:coolcodemy,项目名称:bouncer,代码行数:13,代码来源:Seeder.php

示例2: passesAuthorization

 /**
  * Deteremine if the request passes the authorization check.
  *
  * @return bool
  */
 protected function passesAuthorization()
 {
     if (method_exists($this, 'authorize')) {
         return $this->container->call([$this, 'authorize']);
     }
     return false;
 }
开发者ID:AlexCutts,项目名称:framework,代码行数:12,代码来源:FormRequest.php

示例3: boot

 /**
  * @param \Notadd\Foundation\Extension\Abstracts\ExtensionRegistrar $registrar
  *
  * @throws \Exception
  */
 public function boot(ExtensionRegistrar $registrar)
 {
     if (method_exists($registrar, 'register')) {
         $this->container->call([$registrar, 'register']);
     }
     $this->booted[get_class($registrar)] = $registrar;
 }
开发者ID:notadd,项目名称:framework,代码行数:12,代码来源:ExtensionManager.php

示例4: __invoke

 /**
  * Run the database seeds.
  *
  * @return void
  *
  * @throws \InvalidArgumentException
  */
 public function __invoke()
 {
     if (!method_exists($this, 'run')) {
         throw new InvalidArgumentException('Method [run] missing from ' . get_class($this));
     }
     return isset($this->container) ? $this->container->call([$this, 'run']) : $this->run();
 }
开发者ID:bryanashley,项目名称:framework,代码行数:14,代码来源:Seeder.php

示例5: execute

 /**
  * @param \Symfony\Component\Console\Input\InputInterface   $input
  * @param \Symfony\Component\Console\Output\OutputInterface $output
  *
  * @throws \Exception
  * @return mixed
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->input = $input;
     $this->output = $output;
     if (!method_exists($this, 'fire')) {
         throw new Exception('Method fire do not exits!', 404);
     }
     return $this->container->call([$this, 'fire']);
 }
开发者ID:notadd,项目名称:framework,代码行数:16,代码来源:Command.php

示例6: handle

 /**
  * Handle the command.
  *
  * @param Container $container
  */
 public function handle(Container $container)
 {
     $handler = array_get($this->fieldType->getConfig(), 'handler');
     if (!class_exists($handler) && !str_contains($handler, '@')) {
         $handler = array_get($this->fieldType->getHandlers(), $handler);
     }
     if (is_string($handler) && !str_contains($handler, '@')) {
         $handler .= '@handle';
     }
     $container->call($handler, ['fieldType' => $this->fieldType]);
 }
开发者ID:visualturk,项目名称:select-field_type,代码行数:16,代码来源:BuildOptions.php

示例7: handle

 /**
  * Handle the command.
  *
  * @param Container $container
  */
 public function handle(Container $container)
 {
     $container->call(array_get($this->fieldType->getConfig(), 'handler'), ['fieldType' => $this->fieldType]);
 }
开发者ID:websemantics,项目名称:social-field_type,代码行数:9,代码来源:BuildOptions.php

示例8: handle

 /**
  * Execute the console command.
  *
  * @param Container $container
  * @param KyloRen $kyloRen
  * @return mixed
  */
 public function handle(Container $container, KyloRen $kyloRen)
 {
     $container->call([$kyloRen, 'talkToDad'], ['speech' => 'Im in a gang, Im cool now!']);
 }
开发者ID:Fiskell,项目名称:LaravelMeetupDemo,代码行数:11,代码来源:Reunion.php

示例9: boot

 /**
  * Boot method.
  * @return void
  */
 public function boot()
 {
     $this->app->call([$this, 'setup']);
 }
开发者ID:breachofmind,项目名称:birdmin,代码行数:8,代码来源:Module.php

示例10: callWithDependencyInjection

 /**
  * Call the given Closure / class@method and inject its dependencies.
  *
  * Note: Uses the illuminate/container `call` method.
  *
  * @param  callable|string $callback
  * @param  array           $args
  *
  * @return mixed
  */
 public function callWithDependencyInjection($callback, array $args = [])
 {
     return static::$container->call($callback, $args);
 }
开发者ID:anctemarry27,项目名称:cogs,代码行数:14,代码来源:Forge.php

示例11: handle

 /**
  * Handle the command.
  *
  * @param Container $container
  */
 public function handle(Container $container)
 {
     $container->call($this->extension->getLoader(), ['extension' => $this->extension]);
 }
开发者ID:AkibaTech,项目名称:dashboard-module,代码行数:9,代码来源:LoadWidget.php

示例12: register

 /**
  * Register the disk.
  *
  * @param DiskInterface $disk
  */
 public function register(DiskInterface $disk)
 {
     if ($adapter = $disk->getAdapter()) {
         $this->container->call(substr(get_class($adapter), 0, -9) . 'Loader@load', compact('disk', 'adapter'));
     }
 }
开发者ID:bloveless,项目名称:files-module,代码行数:11,代码来源:DiskManager.php

示例13: call

 /**
  * Call the given Closure / class@method and inject its dependencies.
  *
  * @param callable|string $callback
  * @param array           $parameters
  * @param string|null     $defaultMethod
  *
  * @return mixed
  */
 public function call($callback, array $parameters = [], $defaultMethod = null)
 {
     return $this->delegate->call($callback, $parameters, $defaultMethod);
 }
开发者ID:Mosaic,项目名称:Mosaic,代码行数:13,代码来源:Container.php


注:本文中的Illuminate\Container\Container::call方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。