@@ -45,7 +45,7 @@ public function metadataFor(string $name): ComponentMetadata
45
45
$ name = $ this ->classMap [$ name ] ?? $ name ;
46
46
47
47
if (!$ config = $ this ->config [$ name ] ?? null ) {
48
- if (($ template = $ this ->findStaticComponentTemplate ($ name )) !== null ) {
48
+ if (($ template = $ this ->findAnonymousComponentTemplate ($ name )) !== null ) {
49
49
return new ComponentMetadata ([
50
50
'key ' => $ name ,
51
51
'template ' => $ template ,
@@ -133,7 +133,7 @@ private function mount(object $component, array &$data): void
133
133
return ;
134
134
}
135
135
136
- if ($ component instanceof StaticComponent ) {
136
+ if ($ component instanceof AnonymousComponent ) {
137
137
$ component ->mount ($ data );
138
138
139
139
return ;
@@ -164,8 +164,8 @@ private function getComponent(string $name): object
164
164
$ name = $ this ->classMap [$ name ] ?? $ name ;
165
165
166
166
if (!$ this ->components ->has ($ name )) {
167
- if ($ this ->isStaticComponent ($ name )) {
168
- return new StaticComponent ();
167
+ if ($ this ->isAnonymousComponent ($ name )) {
168
+ return new AnonymousComponent ();
169
169
}
170
170
171
171
throw new \InvalidArgumentException (sprintf ('Unknown component "%s". The registered components are: %s. And no anonymous component founded ' , $ name , implode (', ' , array_keys ($ this ->components ->getProvidedServices ()))));
@@ -208,12 +208,12 @@ private function postMount(object $component, array $data): array
208
208
return $ data ;
209
209
}
210
210
211
- private function isStaticComponent (string $ name ): bool
211
+ private function isAnonymousComponent (string $ name ): bool
212
212
{
213
- return null !== $ this ->findStaticComponentTemplate ($ name );
213
+ return null !== $ this ->findAnonymousComponentTemplate ($ name );
214
214
}
215
215
216
- public function findStaticComponentTemplate (string $ name ): ?string
216
+ public function findAnonymousComponentTemplate (string $ name ): ?string
217
217
{
218
218
$ loader = $ this ->environment ->getLoader ();
219
219
$ componentPath = rtrim (str_replace (': ' , '/ ' , $ name ));
0 commit comments