Resets all Composer references in the application.

@param ComposerApplication $application
962729
private function resetComposers(ComposerApplication $application)
    {
        $application->resetComposer();
        foreach ($this->getApplication()->all() as $command) {
            if ($command instanceof BaseCommand) {
                $command->resetComposer();
            }
        }
    }
1261623
public function boot (Application $app) {
        if (isset($app[self::NS . ".default_args"]) && is_array($app[self::NS . ".default_args"])) {
            $this -> getPreserialiser($app) -> setDefaultArgs($app[self::NS . ".default_args"]);
        } else {
        }
    }
929225
public function init(Application $application)
    {
        $application->addService('staticController', new StaticControllerService());
        $application->any(':all', $application->getService('staticController'));
    }
1234260
public function setApplication(ApplicationInterface $application, $status = null)
    {
        $this->application = $application;
        $this->setTo($application->getContact()->getEmail(), $application->getContact()->getDisplayName(false));
        $this->setVariablesFromApplication($application);
        return $this;
    }
1280933
public function setApplication(Application $application = null)
    {
        if ($application !== null && !$application instanceof Shell) {
            throw new \InvalidArgumentException('PsySH Commands require an instance of Psy\Shell');
        }

        return parent::setApplication($application);
    }
595865
public void reset() {
        setDisplayName(null);
        setAbbreviatedDisplayName(null);
        setDescription(null);
        setInverseIsA(ArrayUtils.EMPTY_STRING_ARRAY);
        setTermIds(ArrayUtils.EMPTY_STRING_ARRAY);
        setPropertyDefinitions(new PropertyDefinition[]{});
        setReferenceDefinitions(new ReferenceDefinition[]{});
        setInDataSource(false);
        setAccessed(null);
        setCreated(null);
        setUpdated(null);
    }
122922
public static function reset($reference = null)
    {
        if ($reference === null) {
            static::$_registered = [];
            Suite::reset();
            return;
        }
        unset(static::$_registered[Suite::hash($reference)]);
    }
690730
public static function cleanConfigFileCache($application = null)
    {
        if (empty($application)) {
            $application = Yii::$app;
        }
        $appKey = UniApplication::appKey($application);
        static::$_configFiles[$appKey] = [];
    }
296510
public function clearRuntime()
    {
        $file = \Imi\Util\Imi::getRuntimePath('runtime.cache');
        if(is_file($file))
        {
            unlink($file);
            echo 'Clear app runtime complete', PHP_EOL;
        }
        else
        {
            echo 'App runtime does not exists', PHP_EOL;
        }
    }
745067
public function boot(Application $app)
    {
        AnnotationRegistry::registerAutoloadNamespace("Swagger\Annotations", $app["swagger.srcDir"]);

        if ($app["logger"]) {
            $logger = Logger::getInstance();
            $originalLog = $logger->log;
            $logger->log = function ($entry, $type) use ($app, $originalLog) {
                $app["logger"]->notice($entry);
                $originalLog($entry, $type);
            };
        }

        $app->get($app["swagger.apiDocPath"], new ResourceListController());
        $app->get("{$app["swagger.apiDocPath"]}/{service}", new ResourceDefinitionController());
    }
595220
private static function refreshRoutes(Application $app)
    {
        if (static::$hasPushedRefreshCallback) {
            return;
        }
        static::$hasPushedRefreshCallback = true;
        $app->booted(function (Application $app) {
            $routes = $app->make('router')->getRoutes();
            if (method_exists($routes, 'refreshNameLookups')) {
                $routes->refreshNameLookups();
            }
            if (method_exists($routes, 'refreshActionLookups')) {
                $routes->refreshActionLookups();
            }
        });
    }
467220
public static function getApplication($application)
    {
        return isset(self::$_applications[$application]) ? self::$_applications[$application] : null;
    }
690094
public static function saveAppRoutes($app = null)
    {
        $app = empty($app) ? Yii::$app : $app;
        $appKey = UniApplication::appKey($app);

        if ($app->cache instanceof Cache && isset(static::$_routes[$appKey])) {
            $app->cache->set($appKey, static::$_routes[$appKey], static::$defaultCacheDuration);
        }
    }
172566
public function boot(Application $app)
    {
        // Register Monolog error handler for fatal errors here because Symfony's handler overrides it
        $monologErrorHandler = new MonologErrorHandler($app['log']);

        $monologErrorHandler->registerErrorHandler();
        $monologErrorHandler->registerFatalHandler();
    }
990443
protected function callAfterCallbacks(Application $app)
    {
        foreach ($this->_afterCallbacks as $callback) {
            call_user_func($callback, $app);
        }
    }
1196246
public function registerBeans(ApplicationInterface $application)
    {

        // parse the object descriptors
        $this->parseObjectDescriptors();

        // load the object manager
        /** @var \AppserverIo\Psr\Di\ObjectManagerInterface $objectManager */
        $objectManager = $this->getApplication()->search(ObjectManagerInterface::IDENTIFIER);

        // register the beans found by annotations and the XML configuration
        /** \AppserverIo\Psr\Deployment\DescriptorInterface $objectDescriptor */
        foreach ($objectManager->getObjectDescriptors() as $descriptor) {
            // check if we've found a bean descriptor and register the bean
            if ($descriptor instanceof BeanDescriptorInterface) {
                $this->registerBean($descriptor);
            }
        }
    }
1361121
protected function setThemeResolver(Application $app)
    {
        if ($app->resolved('view')) {
            $app->make('antares.theme')->resolving();
        } else {
            $app->resolving('view', function () use ($app) {
                $app->make('antares.theme')->resolving();
            });
        }
    }