public static function fromArray(Project $project, $array)
 {
     $class = new self($array['name'], $array['line']);
     $class->shortDesc = $array['short_desc'];
     $class->longDesc = $array['long_desc'];
     $class->hint = $array['hint'];
     $class->tags = $array['tags'];
     $class->namespace = $array['namespace'];
     $class->hash = $array['hash'];
     $class->file = $array['file'];
     $class->modifiers = $array['modifiers'];
     if ($array['is_interface']) {
         $class->setInterface(true);
     }
     if ($array['is_trait']) {
         $class->setTrait(true);
     }
     $class->aliases = $array['aliases'];
     $class->errors = $array['errors'];
     $class->parent = $array['parent'];
     $class->interfaces = $array['interfaces'];
     $class->constants = $array['constants'];
     $class->setProject($project);
     foreach ($array['methods'] as $method) {
         $method = MethodReflection::fromArray($project, $method);
         $method->setClass($class);
         $class->addMethod($method);
     }
     foreach ($array['properties'] as $property) {
         $property = PropertyReflection::fromArray($project, $property);
         $property->setClass($class);
         $class->addProperty($property);
     }
     foreach ($array['constants'] as $constant) {
         $constant = ConstantReflection::fromArray($project, $constant);
         $constant->setClass($class);
         $class->addConstant($constant);
     }
     return $class;
 }