mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 10:07:12 +00:00
Work towards stabilizing the API.
- Changed Tag to an interface and flattened hierarchy - Changed Description to accept a list of tags and a template - Allow auto-wiring when constructing tags
This commit is contained in:
committed by
Mike van Riel
parent
2054338d51
commit
2c18f0e883
@@ -47,12 +47,18 @@ final class DocBlockFactory implements DocBlockFactoryInterface
|
||||
*/
|
||||
public static function createInstance(array $additionalTags = [])
|
||||
{
|
||||
$tagFactory = new TagFactory(new FqsenFactory());
|
||||
$fqsenResolver = new FqsenResolver();
|
||||
$tagFactory = new TagFactory($fqsenResolver);
|
||||
$descriptionFactory = new DescriptionFactory($tagFactory);
|
||||
|
||||
$tagFactory->addService($descriptionFactory);
|
||||
$tagFactory->addService(new TypeResolver($fqsenResolver));
|
||||
|
||||
foreach ($additionalTags as $tagName => $tagClassName) {
|
||||
$tagFactory->registerTagHandler($tagName, $tagClassName);
|
||||
}
|
||||
|
||||
return new self(new DescriptionFactory($tagFactory), $tagFactory);
|
||||
return new self($descriptionFactory, $tagFactory);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user