Core.php
public function run(callable $applicationThick)
    {
        try {
            /** @var PromiseManager $promiseManager */
            $promiseManager = $this->getContainerManager()
                ->getContainer()
                ->get(PromiseManager::class);

            $promiseManager->addPromise('shutdown', function () {
                ShutdownPromisePool::callAllPromises();
            });

            $applicationThick();

            RouterStore::makeBinding();

        } catch (\Throwable $e) {
            if (!is_null($this->logger)) {
                $this->logger->error($e->getMessage(), [
                    'stacktrace' => $e->getTrace(),
                ]);
            }
        } finally {
            ShutdownPromisePool::callAllPromises();
        }
    }
public function run(callable $applicationThick)
    {
        try {
            /** @var PromiseManager $promiseManager */
            $promiseManager = $this->getContainerManager()
                ->getContainer()
                ->get(PromiseManager::class);

            $promiseManager->addPromise('shutdown', function () {
                ShutdownPromisePool::callAllPromises();
            });

            $applicationThick();

            RouterStore::makeBinding();

        } catch (\Throwable $e) {
            if (!is_null($this->logger)) {
                $this->logger->error($e->getMessage(), [
                    'stacktrace' => $e->getTrace(),
                ]);
            }
        } finally {
            ShutdownPromisePool::callAllPromises();
        }
    }
public function run ( callable $ applicationThick ) { try { /** @var PromiseManager $promiseManager */ $ promiseManager = $ this -> getContainerManager ( ) -> getContainer ( ) -> get ( PromiseManager :: class ) ; $ promiseManager -> addPromise ( 'shutdown' , function ( ) { ShutdownPromisePool :: callAllPromises ( ) ; } ) ; $ applicationThick ( ) ; RouterStore :: makeBinding ( ) ; } catch ( \ Throwable $ e ) { if ( ! is_null ( $ this -> logger ) ) { $ this -> logger -> error ( $ e -> getMessage ( ) , [ 'stacktrace' => $ e -> getTrace ( ) , ] ) ; } } finally { ShutdownPromisePool :: callAllPromises ( ) ; } }
Run the App
@param callable $applicationThick
Run the App