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


PHP Container::afterResolving方法代码示例

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


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

示例1: boot

 /**
  * Set up the various view engines.
  *
  * @param Container $app
  */
 public function boot(Container $app)
 {
     $app->afterResolving(function (Factory $factory, $app) {
         $factory->addExtension('php', 'php', function () {
             return new PhpEngine();
         });
         $factory->addExtension('blade.php', 'blade', function () use($app) {
             return new CompilerEngine($app->make(BladeCompiler::class));
         });
         $factory->addExtension('md', 'markdown', function () use($app) {
             return new CompilerEngine($app->make(Markdown::class));
         });
     });
     $app->when(BladeCompiler::class)->needs('$cachePath')->give(vfsStream::setup('root/.blade')->url());
 }
开发者ID:parsnick,项目名称:steak,代码行数:20,代码来源:ConfigureViewEngines.php

示例2: build

 /**
  * Run the build command.
  *
  * @return bool
  */
 protected function build()
 {
     $container = new Container();
     $container->singleton('files', Filesystem::class);
     $container->bind(Factory::class, function ($app) {
         return new Factory($app->make(EngineResolver::class), new FileViewFinder($app['files'], ['test/source']), new Dispatcher($app));
     });
     $container->afterResolving(function (Factory $factory, $app) {
         $factory->addExtension('php', 'php', function () {
             return new PhpEngine();
         });
         $factory->addExtension('blade.php', 'blade', function () use($app) {
             return new CompilerEngine(new BladeCompiler($app['files'], vfsStream::url('test/.cache')));
         });
     });
     $builder = new Builder($container, [Skip::class . ':_*', Compile::class]);
     return $builder->build(vfsStream::url('test/source'), vfsStream::url('test/build'));
 }
开发者ID:parsnick,项目名称:steak,代码行数:23,代码来源:BuildInVfs.php

示例3: registerValidationResolverHook

 /**
  * Register the "ValidatesWhenResolved" container hook.
  *
  * @return void
  */
 protected function registerValidationResolverHook()
 {
     $this->container->afterResolving(function (ValidatesWhenResolved $resolved) {
         $resolved->validate();
     });
 }
开发者ID:txthinking,项目名称:validation,代码行数:11,代码来源:ValidatorProvider.php

示例4: boot

 /**
  * Set up required container bindings.
  *
  * @param Container $app
  */
 public function boot(Container $app)
 {
     $app->afterResolving(function (BladeCompiler $compiler, $app) {
         $this->allowHighlightTag($compiler);
     });
 }
开发者ID:parsnick,项目名称:steak,代码行数:11,代码来源:RegisterBladeExtensions.php


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