- A lot of bugfixes made for this release.
This commit is contained in:
1 parent
4e909b2840
commit
8df38b568c
13 files changed
+159
-71
No files matched your search
@@ -54,11 +54,17 @@ abstract class Context {
|
||||
|
||||
public function renderFunctions() : string
|
||||
{
|
||||
$cls = $this->compiledClassPath();
|
||||
$ns = $this->namespace ? "\\{$this->namespace}\\" : "";
|
||||
if ($this->extendFrom) {
|
||||
return "parent::exportFunctions();";
|
||||
}
|
||||
else {
|
||||
$cls = $this->compiledClassPath();
|
||||
$ns = $this->namespace ? "\\{$this->namespace}\\" : "";
|
||||
|
||||
foreach($this->functionStack as $name => $function) {
|
||||
$list[] = <<<FUNC
|
||||
$list = ['static $caching = [];'];
|
||||
|
||||
foreach ($this->functionStack as $name => $function) {
|
||||
$list[] = <<<FUNC
|
||||
if ( false === ( ( \$caching['$ns$name'] ?? false) || function_exists( '$ns$name' ) ) ) {
|
||||
\$caching['$ns$name'] = true;
|
||||
|
||||
@@ -67,9 +73,10 @@ abstract class Context {
|
||||
}
|
||||
}
|
||||
FUNC;
|
||||
}
|
||||
}
|
||||
|
||||
return implode(PHP_EOL, $list);
|
||||
return implode(PHP_EOL, $list);
|
||||
}
|
||||
}
|
||||
|
||||
public function exportFunctions() : void
|
||||
|
||||
Reference in new issue
Block a user