Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2931a462c0 |
@@ -158,6 +158,19 @@ class Compiler
|
|||||||
return $this->extensionList[$tokenName];
|
return $this->extensionList[$tokenName];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getExtensionInstanceOf(string $class) : Extension\Extension
|
||||||
|
{
|
||||||
|
foreach(array_reverse($this->extensionList) as $ext) {
|
||||||
|
if ( is_a($ext, $class, false) ) {
|
||||||
|
return $ext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new \InvalidArgumentException(<<<MSG
|
||||||
|
Requested extension instance of `$class` could not be found from loaded Picea compiler's extension.
|
||||||
|
MSG);
|
||||||
|
}
|
||||||
|
|
||||||
public function exportFunctions() : void
|
public function exportFunctions() : void
|
||||||
{
|
{
|
||||||
static $caching = [];
|
static $caching = [];
|
||||||
|
|||||||
Reference in new issue
Block a user