hartmann/magic-property-extractor

Provides property information based on class documentation

0.1.1 2019-07-23 16:58 UTC

This package is auto-updated.

Last update: 2024-05-04 21:38:13 UTC


README

This package adds an additional extractor for the symfony/property-info package which is able to interpret @property, @property-read and @property-write tags documented in the DocComment of a class.

Installation

composer require hartmann/magic-property-extractor

Usage

use Hartmann\PropertyInfo\Extractor\PhpDocMagicExtractor

$magicExtractor = new PhpDocMagicExtractor();
$properties = $magicExtractor->getProperties(\Foo::class);

or create a new PropertyInfoExtractor instance and provide it with a set of information extractors

Extractable Information

This Extractor implements the following interfaces:

  • PropertyDescriptionExtractorInterface
  • PropertyTypeExtractorInterface
  • PropertyAccessExtractorInterface
  • PropertyListExtractorInterface

Planned features

  • Support magic accessors and mutators