Example #1
0
 /**
  * Get the parent name
  *
  * @return string|null null when no parent class exists
  */
 public function getParent()
 {
     if ($this->parent === null) {
         return null;
     }
     return $this->nameResolver->resolve($this->parent, $this->getNamespace());
 }
Example #2
0
 /**
  * @return array
  */
 public function getInstanciedClasses()
 {
     $classes = array();
     foreach ($this->instanciedClasses as $name) {
         array_push($classes, $this->nameResolver->resolve($name, null));
     }
     return $classes;
 }
Example #3
0
 /**
  * @return array
  */
 public function getInterfaces()
 {
     $resolvedInterfaces = array();
     foreach ($this->interfaces as $interface) {
         array_push($resolvedInterfaces, $this->nameResolver->resolve($interface, $this->namespace));
     }
     return $resolvedInterfaces;
 }
 /**
  * @return array
  */
 public function getDependencies()
 {
     // on read : compare with aliases. We cannot make it in pushDependency() => aliases aren't yet known
     $dependencies = array();
     foreach ($this->dependencies as $name) {
         array_push($dependencies, $this->nameResolver->resolve($name, null));
     }
     return array_unique($dependencies);
 }
Example #5
0
 public function testTheNameResolverShouldNotResolveTheNamespaceOfNotUsedClassesWhenNoNamespaceIsKnown()
 {
     $this->assertSame('baz', $this->resolver->resolve('baz', null));
 }