builtins = new BuiltinVariables( $types ); $this->repository = new VariableRepository(); $this->categories = new CategoryRepository(); $rules = new RuleRepository(); $rules->register(); $scanner = new UsageScanner( $this->repository, $rules, null, null, $this->builtins ); $replacer = new ReferenceReplacementService( $this->repository, $rules ); $this->resolver = new VariableResolver( $this->repository, null, $this->builtins ); $this->renderer = new Renderer( $types ); $this->locales = new LocaleManager( $rules ); $this->locales->register(); $standalone = new StandaloneLocale( $this->locales ); $standalone->register(); ( new LocaleSwitcher( $standalone, new LocaleCatalog( $rules ) ) )->register(); ( new PageCacheCompatibility( $standalone ) )->register(); ( new WeglotCompatibility() )->register(); ( new LocaleAdmin( $this->locales, new LocaleCatalog( $rules ), $this->repository ) )->register(); add_filter( 'glovario_resolved_value', array( new RuleEngine( $rules, $this->locales ), 'resolve' ), 5, 3 ); ( new RuleBoundaryScheduler( $rules ) )->register(); ( new ContentChangePurge() )->register(); ( new Shortcode( $this->resolver, $this->renderer ) )->register(); ( new Tokens( $this->resolver, $this->renderer ) )->register(); $titles = new TitleShortcodes( $this->resolver ); $titles->register(); ( new SeoCompatibility( $titles ) )->register(); ( new SlugFollow( $titles ) )->register(); ( new SiteVariableBlock( $this->resolver, $this->renderer ) )->register(); ( new VariablesController( $this->repository, $this->renderer, $this->builtins ) )->register(); ( new Capabilities() )->register(); $this->selection = new SelectionVariables( $this->repository, $types, $rules, $this->locales, $this->categories ); $this->selection->register(); if ( is_admin() ) { $value_editor = new ValueEditor( $this->repository, $types, $rules ); $value_editor->register(); ( new AdminController( $this->repository, $types, $this->categories, $scanner, $replacer, $this->builtins, $value_editor ) )->register(); ( new CategoryAdmin( $this->categories ) )->register(); ( new ContentConversionAdmin( $this->repository, new ContentConversionService() ) )->register(); ( new OverviewAdmin( $this->repository, $this->categories, $this->builtins ) )->register(); ( new UsageAdmin( $this->repository, $types, $scanner, $this->builtins ) )->register(); ( new TitleEditorIntegration( $this->repository, $this->builtins ) )->register(); ( new TransferAdmin( new JsonTransferService( $this->repository, $rules, $types ) ) )->register(); ( new RuleAdmin( $this->repository, $types, $rules, $this->locales ) )->register(); } } public function repository() { return $this->repository; } public function resolver() { return $this->resolver; } public function renderer() { return $this->renderer; } public function categories() { return $this->categories; } public function builtins() { return $this->builtins; } public function locales() { return $this->locales; } public function selection() { return $this->selection; } }