• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..07-Dec-2021-

src/Metadata/H26-Oct-2018-1,046610

tests/H26-Oct-2018-869667

.gitignoreH A D26-Oct-20186 11

.travis.ymlH A D26-Oct-2018392 2317

CHANGELOG.mdH A D26-Oct-20181.1 KiB4330

LICENSEH A D26-Oct-20181 KiB2016

README.rstH A D26-Oct-20181.2 KiB3826

composer.jsonH A D26-Oct-2018743 3332

composer.lockH A D26-Oct-20188 KiB251250

phpunit.xml.distH A D26-Oct-2018679 2623

README.rst

1Metadata is a library for class/method/property metadata management in PHP
2==========================================================================
3
4Overview
5--------
6
7This library provides some commonly needed base classes for managing metadata
8for classes, methods and properties. The metadata can come from many different
9sources (annotations, YAML/XML/PHP configuration files).
10
11The metadata classes are used to abstract away that source and provide a common
12interface for all of them.
13
14Usage
15-----
16
17The library provides three classes that you can extend to add your application
18specific properties, and flags: ``ClassMetadata``, ``MethodMetadata``, and
19``PropertyMetadata``
20
21After you have added, your properties in sub-classes, you also need to add
22``DriverInterface`` implementations which know how to populate these classes
23from the different metadata sources.
24
25Finally, you can use the ``MetadataFactory`` to retrieve the metadata::
26
27    <?php
28
29    use Metadata\MetadataFactory;
30    use Metadata\Driver\DriverChain;
31
32    $driver = new DriverChain(array(
33        /** Annotation, YAML, XML, PHP, ... drivers */
34    ));
35    $factory = new MetadataFactory($driver);
36    $metadata = $factory->getMetadataForClass('MyNamespace\MyObject');
37
38