Example #1
0
 protected function renderNamespaceTemplates(array $namespaces, Project $project, $callback = null)
 {
     foreach ($namespaces as $namespace) {
         if (null !== $callback) {
             call_user_func($callback, Message::RENDER_PROGRESS, array('Namespace', $namespace, $this->getProgression()));
         }
         $variables = array('namespace' => $namespace, 'classes' => $project->getNamespaceClasses($namespace), 'interfaces' => $project->getNamespaceInterfaces($namespace), 'exceptions' => $project->getNamespaceExceptions($namespace));
         foreach ($this->theme->getTemplates('namespace') as $template => $target) {
             $this->save($project, sprintf($target, str_replace('\\', '/', $namespace)), $template, $variables);
         }
     }
 }
Example #2
0
 /**
  * Get all exceptions in the namespace.
  *
  * @param  string $namespace Namespace.
  *
  * @return string
  */
 public function getNamespaceExceptions($namespace)
 {
     $this->parse();
     return $this->project->getNamespaceExceptions($namespace);
 }