PropertyDocBlockExtractorInterface.php 984 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\PropertyInfo;
  11. use phpDocumentor\Reflection\DocBlock;
  12. /**
  13. * Extract a property's doc block.
  14. *
  15. * A property's doc block may be located on a constructor promoted argument, on
  16. * the property or on a mutator for that property.
  17. *
  18. * @author Tobias Nyholm <tobias.nyholm@gmail.com>
  19. */
  20. interface PropertyDocBlockExtractorInterface
  21. {
  22. /**
  23. * Gets the first available doc block for a property. It finds the doc block
  24. * by the following priority:
  25. * - constructor promoted argument
  26. * - the class property
  27. * - a mutator method for that property
  28. *
  29. * If no doc block is found, it will return null.
  30. */
  31. public function getDocBlock(string $class, string $property): ?DocBlock;
  32. }