public function __construct(Clazz $class, Property $property, $declaringClass = null) { $this->class = $class; $this->property = $property; $this->name = $property->getName(); if ($class->getName() === $declaringClass) { $declaringClass = null; } $this->declaringClass = $declaringClass; }
public function __construct(Clazz $class, Method $method, $declaringClass = null) { $this->class = $class; $this->method = $method; $this->name = strtolower($method->getName()); if ($class->getName() === $declaringClass) { $declaringClass = null; } $this->declaringClass = $declaringClass; }
public function __construct(Clazz $class, Constant $constant, $declaringClass = null) { $this->class = $class; $this->constant = $constant; $this->name = $constant->getName(); if ($class->getName() === $declaringClass) { $declaringClass = null; } $this->declaringClass = $declaringClass; }
private function inferTypesForClass(Clazz $class) { $this->parser->setCurrentClassName($class->getName()); $this->parser->setImportedNamespaces($class->getImportedNamespaces()); foreach ($class->getConstants() as $constant) { $this->inferTypesForClassConstant($constant->getConstant()); } foreach ($class->getMethods() as $method) { $this->inferTypesForMethodOrFunction($method->getMethod(), $class); } foreach ($class->getProperties() as $property) { $this->inferTypesForProperty($property->getProperty()); } }
private function setUpClass($class, array $extends) { $class = new Clazz($class); if (isset($extends[$class->getName()])) { $parentClass = $this->setUpClass($extends[$class->getName()], $extends); $class->setSuperClasses(array_merge(array($parentClass->getName()), $parentClass->getSuperClasses())); $class->setSuperClass($parentClass->getName()); } $class->setNormalized(true); $this->registry->registerClass($class); return $class; }