/** * Retrieve class footprint from class scanner * * @param ClassScanner $class * * @return ClassFootprint */ protected function getClassFootprint(ClassScanner $class) { $footprint = new ClassFootprint(); if ($class->isInterface()) { $footprint->setType(ClassFootprint::TYPE_INTERFACE); } elseif ($class->isTrait()) { $footprint->setType(ClassFootprint::TYPE_TRAIT); } $footprint->setParent($class->getParentClass()); foreach ($class->getConstants(false) as $constant) { $footprint->addConstant($constant->getName(), $constant->getValue()); } foreach ($class->getInterfaces() as $interface) { $footprint->addInterface($interface); } return $footprint; }