src/Collector/Manager.php
public function recollect(bool $fresh = true): bool
    {
        if (!$this->app->getCache()->clear()) {
            return false;
        }

        $this->collectorsIncluded = false;
        $list = $this->app->getCollectorList($fresh);

        if ($fresh) {
            $this->cache = [];
            $this->app->clearCachedObjects();
            $this->router = new Router();
            $this->container = $container = new Container();
            foreach ($list as $name => $collector) {
                $container->alias($name, $collector['class']);
                $container->singleton($collector['class']);
            }
        }

        foreach (array_keys($list) as $entry) {
            $this->collect($entry, $fresh);
        }

        $this->app->getEventDispatcher()->emit("system.collect");

        return true;
    }
public function recollect(bool $fresh = true): bool
    {
        if (!$this->app->getCache()->clear()) {
            return false;
        }

        $this->collectorsIncluded = false;
        $list = $this->app->getCollectorList($fresh);

        if ($fresh) {
            $this->cache = [];
            $this->app->clearCachedObjects();
            $this->router = new Router();
            $this->container = $container = new Container();
            foreach ($list as $name => $collector) {
                $container->alias($name, $collector['class']);
                $container->singleton($collector['class']);
            }
        }

        foreach (array_keys($list) as $entry) {
            $this->collect($entry, $fresh);
        }

        $this->app->getEventDispatcher()->emit("system.collect");

        return true;
    }
public function recollect ( bool $ fresh = true ) : bool { if ( ! $ this -> app -> getCache ( ) -> clear ( ) ) { return false ; } $ this -> collectorsIncluded = false ; $ list = $ this -> app -> getCollectorList ( $ fresh ) ; if ( $ fresh ) { $ this -> cache = [ ] ; $ this -> app -> clearCachedObjects ( ) ; $ this -> router = new Router ( ) ; $ this -> container = $ container = new Container ( ) ; foreach ( $ list as $ name => $ collector ) { $ container -> alias ( $ name , $ collector [ 'class' ] ) ; $ container -> singleton ( $ collector [ 'class' ] ) ; } } foreach ( array_keys ( $ list ) as $ entry ) { $ this -> collect ( $ entry , $ fresh ) ; } $ this -> app -> getEventDispatcher ( ) -> emit ( "system.collect" ) ; return true ; }
Recollect all items

@param bool $fresh (optional)

@return bool
Recollect all items