@param Container $app

@return \Ray\Aop\Pointcut
189156
public function configure(Container $app): Pointcut
    {
        return new Pointcut(
            new AnnotationScanMatcher($this->annotation),
            (new Matcher)->any(),
            []
        );
    }
1124749
protected static function runningApprovedArtisanCommand($app)
    {
        return $app->runningInConsole() && ! in_array(
            $_SERVER['argv'][1] ?? null,
            array_merge([
                // 'migrate',
                'migrate:rollback',
                'migrate:fresh',
                // 'migrate:refresh',
                'migrate:reset',
                'migrate:install',
                'package:discover',
                'queue:listen',
                'queue:work',
                'horizon',
                'horizon:work',
                'horizon:supervisor',
            ], config('telescope.ignoreCommands', []), config('telescope.ignore_commands', []))
        );
    }
804810
public function boot(Container $app)
    {
        $app->afterResolving(function (BladeCompiler $compiler, $app) {

            $this->allowHighlightTag($compiler);

        });
    }
961283
public function register(Container $app)
    {
        $app['sanity.client.options'] = [
            'projectId' => null,
            'dataset' => null,
        ];

        $app['sanity.client'] = function (Application $app) {
            return new Client($app['sanity.client.options']);
        };
    }
307688
protected function checkDependencies(Container $app)
    {
        $dependencies = [
            'twig' => 'TwigServiceProvider',
            'session' => 'SessionServiceProvider',
            'translator' => 'TranslationServiceProvider',
            'validator' => 'ValidatorServiceProvider',
            'form.factory' => 'FormServiceProvider',
            'security.token_storage' => 'SecurityServiceProvider'
        ];

        if (!$app['resolver'] instanceof ServiceControllerResolver) {
            throw new LogicException('You must register the ServiceControllerServiceProvider to use the UserServiceProvider');
        }

        foreach ($dependencies as $key => $provider) {
            if (!isset($app[$key])) {
                throw new LogicException(sprintf('You must register the %s to use the UserServiceProvider', $provider));
            }
        }
    }
269293
public function configure(Container $app): Pointcut
    {
        $interceptor = new CacheEvictInterceptor;
        $interceptor->setCache($app['Illuminate\Contracts\Cache\Factory']);
        $this->setInterceptor($interceptor);

        return $this->withAnnotatedAnyInterceptor();
    }
652504
protected function getContainer(): ContainerInterface
    {
        if (null === $this->container) {
            $app = $this->getApplication();

            if (!$app instanceof Application) {
                throw new \RuntimeException('Sculpin Application not found!');
            }

            $this->container = $app->getKernel()->getContainer();
        }

        return $this->container;
    }
913743
public function configure(Container $app): Pointcut
    {
        $interceptor = new LogExceptionsInterceptor;
        $interceptor->setLogger($app['Psr\Log\LoggerInterface']);
        $this->setInterceptor($interceptor);

        return $this->withAnnotatedAnyInterceptor();
    }
1021582
public static function endpointsInfo(Application $app)
    {
        $app->boot();

        /** @var ControllerCollection $controllers */
        $controllers = $app['controllers'];
        $rControllers = new ReflectionObject($controllers);
        $pControllers = $rControllers->getProperty('controllers');
        $pControllers->setAccessible(true);

        /** @var Controller $ctrl */
        foreach ($pControllers->getValue($controllers) as $ctrl) {
            if ($ctrl instanceof Controller) {
                $route = $ctrl->getRoute();

                foreach ($route->getMethods() as $method) {
                    echo '- ' . str_pad($method, 7) . ' ' . str_pad($route->getPath(), 70);

                    if ($service = $route->getDefault('_controller')) {
                        if (is_scalar($service)) {
                            echo 'Handler: ' . $service;
                        }
                    }

                    echo "\n";
                }
            }
        }
    }
254132
protected function provideTemplatingSystem(Application $app)
    {
        $templateDir = __DIR__ . '/../../../data/templates';

        // when installed using composer the templates are in a different folder
        $composerTemplatePath = __DIR__ . '/../../../../templates';
        if (file_exists($composerTemplatePath)) {
            $templateDir = $composerTemplatePath;
        }

        // parameters
        $app['transformer.template.location'] = $templateDir;

        // services
        $app['transformer.template.path_resolver'] = $app->share(
            function ($container) {
                return new PathResolver($container['transformer.template.location']);
            }
        );

        $app['transformer.template.factory'] = $app->share(
            function ($container) {
                return new Factory(
                    $container['transformer.template.path_resolver'],
                    $container['serializer']
                );
            }
        );

        $app['transformer.template.collection'] = $app->share(
            function ($container) {
                return new Template\Collection(
                    $container['transformer.template.factory'],
                    $container['transformer.writer.collection']
                );
            }
        );
    }
514096
public function handle(Container $app, Sandbox $sandbox)
    {
        $view = $app->make('view');

        $closure = function () use ($app) {
            $this->container = $app;
            $this->shared['app'] = $app;
        };

        $resetView = $closure->bindTo($view, $view);
        $resetView();

        return $app;
    }
319606
public function bootstrap(Container $app)
    {
        $this->app = $app;
        
        $this->app->singleton('env', function ($app) {
            return new Dotenv(base_path(), $this->getEnvFileName());
        });
        
        $env = $this->app->make('env');
        
        $env->overload();
        $env->required([
            'DB_NAME',
            'DB_USER',
            'DB_PASS',
            'DB_HOST',
        ]);
    }
356637
public function bootstrap(Container $app)
    {
        foreach ($app->make('config')->get('app.services') as $key => $services) {
            foreach ((array) $services as $service) {
                $app->alias($key, $service);
            }
        }
        
        foreach ($app->make('config')->get('app.theme.services', []) as $key => $services) {
            foreach ((array) $services as $service) {
                $app->alias($key, $service);
            }
        }
    }
1085173
public static function buildFromContainer(ContainerInterface $container): App
    {
        return new App(
            self::request($container),
            self::response($container),
            self::processor($container),
            self::matchableRequest($container),
            self::errorHandler($container),
            self::invalidRequestHandler($container),
            self::streamReadLength($container)
        );
    }
84157
public function bootstrap(Application $app)
    {
        /** @var Container $container */
        $container = $app->getContainer();

        $container->share('app', $app);
        $container->alias('app', Application::class);
        $container->alias('app', ApplicationInterface::class);

        $container->share('container', $container);

        $container->share('kernel.http', function () use ($container) {
            return $container->get(Kernel::class);
        });
        $container->alias('kernel.http', KernelInterface::class);

        $container->alias('router', Router::class);
        $container->alias('dispatcher', Dispatcher::class);
    }
1208131
protected function getConfigurationFiles(Container $app)
    {
        $files = [];
        $configPath = realpath($app['path.config']);

        /** @var \Symfony\Component\Finder\SplFileInfo $file */
        foreach (Finder::create()->files()->name('*.php')->in($configPath) as $file) {
            $nesting = $this->getConfigurationNesting($file, $configPath);
            $files[$nesting . basename($file->getRealPath(), '.php')] = $file->getRealPath();
        }

        return $files;
    }
824066
public static function make($app)
    {
        $app->boot();

        $console = with($console = new static('Nova Framework', $app::VERSION))
            ->setContainer($app)
            ->setAutoExit(false);

        $app->instance('forge', $console);

        return $console;
    }