From 3c32a2fb4fe34f3bc24cb0aaa9eedd43b576a26f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Fri, 26 Feb 2016 13:56:19 +0100 Subject: [PATCH] [PropertyInfo] Allow to use a custom DocBlock factory with the PHPDoc extractor --- .../Component/PropertyInfo/Extractor/PhpDocExtractor.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php b/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php index 201fbde60037e..ba843837666e2 100644 --- a/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php +++ b/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php @@ -13,6 +13,7 @@ use phpDocumentor\Reflection\DocBlock; use phpDocumentor\Reflection\DocBlockFactory; +use phpDocumentor\Reflection\DocBlockFactoryInterface; use phpDocumentor\Reflection\Types\Compound; use phpDocumentor\Reflection\Types\ContextFactory; use phpDocumentor\Reflection\Types\Null_; @@ -46,9 +47,9 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property */ private $contextFactory; - public function __construct() + public function __construct(DocBlockFactoryInterface $docBlockFactory = null) { - $this->docBlockFactory = DocBlockFactory::createInstance(); + $this->docBlockFactory = $docBlockFactory ?: DocBlockFactory::createInstance(); $this->contextFactory = new ContextFactory(); } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy