loadTemplateWithPackage() public method

public loadTemplateWithPackage ( ApiGen\Templating\Template $template, string $name, array $package ) : ApiGen\Templating\Template
$template ApiGen\Templating\Template
$name string
$package array
return ApiGen\Templating\Template
コード例 #1
0
ファイル: PackageGenerator.php プロジェクト: rafasashi/ApiGen
 /**
  * {@inheritdoc}
  */
 public function generate()
 {
     foreach ($this->elementStorage->getPackages() as $name => $package) {
         $template = $this->templateFactory->createNamedForElement(TemplateFactory::ELEMENT_PACKAGE, $name);
         $template = $this->namespaceAndPackageLoader->loadTemplateWithPackage($template, $name, $package);
         $template->save();
         $this->eventDispatcher->dispatch(new GenerateProgressEvent(GeneratorEvents::ON_GENERATE_PROGRESS));
     }
 }
コード例 #2
0
 public function generate()
 {
     foreach ($this->elementStorage->getPackages() as $name => $package) {
         $template = $this->templateFactory->createNamedForElement(TemplateFactory::ELEMENT_PACKAGE, $name);
         $template = $this->namespaceAndPackageLoader->loadTemplateWithPackage($template, $name, $package);
         $template->save();
         $this->onGenerateProgress();
     }
 }