Find all bootatble instances and set it to object map
@return void
431653
public function compileBootableClasses(): void
    {
        // list app root's
        foreach ($this->appRoots as $app) {
            $app .= '/Apps/Controller/' . env_name;
            $files = File::listFiles($app, ['.php'], true);
            foreach ($files as $file) {
                // define full class name with namespace
                $class = 'Apps\Controller\\' . env_name . '\\' . Str::cleanExtension($file);
                // check if class exists (must be loaded over autoloader), boot method exist and this is controller instanceof
                if (class_exists($class) && method_exists($class, 'boot') && is_a($class, 'Ffcms\Core\Arch\Controller', true)) {
                    $this->objects[] = $class;
                }
            }
        }

        // list widget root's
        foreach ($this->widgetRoots as $widget) {
            $widget .= '/Widgets/' . env_name;
            // widgets are packed in directory, classname should be the same with root directory name
            $dirs = Directory::scan($widget, GLOB_ONLYDIR, true);
            if (!Any::isArray($dirs)) {
                continue;
            }

            foreach ($dirs as $instance) {
                $class = 'Widgets\\' . env_name . '\\' . $instance . '\\' . $instance;
                if (class_exists($class) && method_exists($class, 'boot') && is_a($class, 'Ffcms\Core\Arch\Widget', true)) {
                    $this->objects[] = $class;
                }
            }
        }
    }
303991
public function boot()
    {
        $this->callBeforeListeners('boot', [$this]);
        $this->callAfterListeners('boot', [$this]);
        $this->wasBooted = true;
        static::$staticInstance = $this;
        static::$staticContainer = $this->container;
    }
964510
protected function bootComponents()
    {
        $config = $this->config();

        foreach ($this->componentInstances as $instance) {
            $instance->boot($this->app, $config);
        }
    }
854245
private function bootProviders()
    {
        foreach ($this->providers as $provider) {
            if ($provider instanceof Closure) {
                $provider($this);
            } else {
                (new $provider($this))->boot();
            }
        }
    }
172849
public static function bootTenantable()
    {
        if ($tenant = config('rinvex.tenants.active')) {
            static::addGlobalScope('tenantable', function (Builder $builder) use ($tenant) {
                $builder->whereHas('tenants', function (Builder $builder) use ($tenant) {
                    $key = $tenant instanceof Model ? $tenant->getKeyName() : (is_int($tenant) ? 'id' : 'slug');
                    $value = $tenant instanceof Model ? $tenant->{$key} : $tenant;
                    $builder->where($key, $value);
                });
            });

            static::saved(function (self $model) use ($tenant) {
                $model->attachTenants($tenant);
            });
        }

        static::deleted(function (self $model) {
            $model->tenants()->detach();
        });
    }
339505
public function bootPlugins()
    {
        foreach($this->activePlugins() as $plugin){
            $className = $plugin->parseNamespace()."\\Plugin";
            if(class_exists($className)) {
                $pluginInstance = new $className();
                if ($plugin->isActive() && method_exists($pluginInstance, 'boot')) {
                    $pluginInstance->boot();
                    $this->bootedPlugins[] = $plugin;
                }
            }
        }
        return;
    }
178795
public function boot()
    {
        if ($this->booted) {
            return;
        }

        array_walk($this->serviceProviders, function($provider)
        {
            $this->bootProvider($provider);
        });

        $this->bootApplication();
    }
214606
protected function bootDevAliases()
    {
        //Get the instance of the alias loader
        $loader = AliasLoader::getInstance();

        // Get Dev class aliases config key.
        $devProviderKey = 'dev-booter.dev_aliases_config_keys.'.$this->app->environment();

        // Boot all classes Aliases.
        $this->collectDevAliases($devProviderKey)->each(function ($facade, $alias) use ($loader) {
            $loader->alias($alias, $facade);
        });
    }
893965
protected function initializeDependencies()
    {
        if ($this->persistenceManager === null) {
            $this->persistenceManager = Bootstrap::$staticObjectManager->get(PersistenceManagerInterface::class);
            $this->reflectionService = Bootstrap::$staticObjectManager->get(ReflectionService::class);
        }
    }
497835
protected static function boot()
    {
        parent::boot();

        static::deleting(function ($model) {
            $model->roles()->detach();

            $model->permissions()->detach();
        });
    }
723506
protected function bootstrap()
    {
        if($this->_isBooted) {
            return;
        }

        swoole_set_process_name($this->name . ':master');
        $this->installSignals();
        $this->_isBooted = true;
    }
1276634
protected function setBootstrapNamespaces()
    {
        $search = [
            $this->currentRoot.'\\Http',
            $this->currentRoot.'\\Console',
            $this->currentRoot.'\\Exceptions',
        ];

        $replace = [
            $this->argument('name').'\\Http',
            $this->argument('name').'\\Console',
            $this->argument('name').'\\Exceptions',
        ];

        $this->replaceIn($this->getBootstrapPath(), $search, $replace);
    }
47075
protected function bootModules()
    {
        // Create instances
        $this->container = new ContainerModule();
        $this->service = new ServiceModule();

        // Pass HttpClient instance reference
        $this->container->setHttpClient($this->httpClient);
        $this->service->setHttpClient($this->httpClient);
    }
850187
protected function callBootable()
    {
        $reflection = new \ReflectionClass($this);

        foreach ($reflection->getMethods() as $method) {
            $methodName = $method->getName();

            // Method name has to start with "boot" and followed by an
            // upper-case latter.
            if (preg_match('/^boot[A-Z]/', $methodName)) {
                $this->getApp()->call([$this, $methodName]);
            }
        }
    }
1336428
protected function bootIfNotBooted()
    {
        if (! isset(static::$booted[static::class])) {
            static::$booted[static::class] = true;

            $this->fireModelEvent('booting', false);

            static::boot();

            $this->fireModelEvent('booted', false);
        }
    }
370260
public static function bootLaraclip()
	{
		static::saved(function($instance) {
			if(is_array($instance->attachedFiles))
			{
				foreach($instance->attachedFiles as $attachedFile) {
					$attachedFile->afterSave($instance);
				}
			}
		});

		static::deleting(function($instance) {
			if(is_array($instance->attachedFiles))
			{
				foreach($instance->attachedFiles as $attachedFile) {
					$attachedFile->beforeDelete($instance);
				}
			}
		});

		static::deleted(function($instance) {
			if(is_array($instance->attachedFiles))
			{
				foreach($instance->attachedFiles as $attachedFile) {
					$attachedFile->afterDelete($instance);
				}
			}
		});
	}
689766
protected function boot()
    {
        if ($this->booted) {
            return;
        }

        fire_callbacks($this->bootCallbacks, $this);

        $this->booted = true;
    }