PHPackages                             alks/metadata - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. alks/metadata

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

alks/metadata
=============

Provides metadata generation for PHP classes

v1.1.1(3y ago)010[1 PRs](https://github.com/AlkisStamos/metadata/pulls)MITPHPPHP ^7.4CI failing

Since Apr 1Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/AlkisStamos/metadata)[ Packagist](https://packagist.org/packages/alks/metadata)[ RSS](/packages/alks-metadata/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (5)Dependencies (4)Versions (7)Used By (0)

Metadata Driver
===============

[](#metadata-driver)

Provides metadata for PHP classes and their members using a collection of metadata drivers

Installation
------------

[](#installation)

```
composer require alks/metadata
```

Usage
-----

[](#usage)

The library comes with 3 metadata driver implementations.

- The **Reflection** Metadata driver collects data using the PHP Reflection API
- The **Doc Comment** Metadata driver parses [PHPDoc](https://www.phpdoc.org/) doc blocks
- The **Annotation** Metadata driver parses [Doctrine Annotations](https://github.com/doctrine/annotations)

Basically each driver extends the one(s) above him (the doc comment driver will use the reflection api as well). In order to use the library generate an instance of the default MetadataDriver and register which drivers (and caches) to use:

```
