Example #1
0
 /**
  * This declare the class use and get the correct name to use (short classname, Alias, or FQCN)
  *
  * @param  AbstractOMBuilder $builder
  * @param  boolean           $fqcn    true to return the $fqcn classname
  * @return string            ClassName, Alias or FQCN
  */
 public function getClassNameFromBuilder($builder, $fqcn = false)
 {
     if ($fqcn) {
         return $builder->getFullyQualifiedClassName();
     }
     $namespace = $builder->getNamespace();
     $class = $builder->getUnqualifiedClassName();
     if (isset($this->declaredClasses[$namespace]) && isset($this->declaredClasses[$namespace][$class])) {
         return $this->declaredClasses[$namespace][$class];
     }
     return $this->declareClassNamespace($class, $namespace, true);
 }