30 private $components =
null;
39 $this->skinContext = $skinContext;
52 if ( $this->components === null ) {
53 $this->registerComponents();
55 $component = $this->components[$name] ??
null;
57 throw new RuntimeException(
'Unknown component: ' . $name );
69 if ( $this->components ===
null ) {
70 $this->registerComponents();
72 return $this->components;
83 private function registerComponent(
string $name ) {
84 $skin = $this->skinContext;
85 $user = $skin->getUser();
97 $skin->getMessageLocalizer(),
99 $skin->getRelevantTitle()
108 throw new RuntimeException(
'Unknown component: ' . $name );
110 $this->components[$name] = $component;
116 private function registerComponents() {
117 $this->registerComponent(
'logos' );
118 $this->registerComponent(
'toc' );
119 $this->registerComponent(
'search-box' );
Parent class for all special pages.
static newSearchPage(User $user)
Get the users preferred search page.