當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。