36 if (UString::isNotNull($this->
namespace)) {
37 $namespaceVar =
"namespace {$this->namespace};";
41 '%namespace%' => $namespaceVar,
45 '%classAttributes%'=>\implode(
"\n", $this->classAttributes)
48 $directory = UFileSystem::getDirFromNamespace($this->
namespace);
49 UFileSystem::safeMkdir($directory);
50 $filename = UFileSystem::cleanFilePathname($directory . \DS . $this->classname .
'.php');
51 if (! \file_exists($filename)) {
52 UFileSystem::openReplaceWriteFromTemplateFile($templateDir . $this->
template, $filename, $variables);