schmittjoh / metadata

Metadata is a library for metadata management in PHP
MIT License
1.79k stars 71 forks source link

More documentation requested #1

Closed olegstepura closed 12 years ago

olegstepura commented 12 years ago

Hi!

From documentation it's not so clear how this library can be used. Can you please update the readme with more information on what this library is targeted to and some more verbose usage examples maybe.

As far as I can see it requires external annotation/xml/yaml/whatsoever reader adapter to get the metadata and those readers must implement some interface which make it necessary to implement it again for each use case but not use the existing Doctrine readers for example.

Does the lib provide the ability to use extra annotations which Doctrine Common's reader does not allow? Does it cache the metadata information by default and what configuration it requires to make caching work.

It would be nice to have the annotated class as an example together with simple howto work with with it and description on the abstraction layers that this lib provides.

Thanks!

schmittjoh commented 12 years ago

Hey,

I probably can't spend as much time on this as it deserves, but I can give you some pointers.

The aim of this library is to provide tools to make the management of metadata easier. Metadata can come from many different sources, including but not limited to XML, YML, PHP, and annotations.

You can have a look at the following bundles (in the Metadata sub-folder) where it is used:

olegstepura commented 12 years ago

Too bad. A little bit more documentation could make this lib much more useful by others.

Is this the place to dig: https://github.com/schmittjoh/JMSSecurityExtraBundle/blob/master/Security/Authorization/Interception/MethodSecurityInterceptor.php ?

olegstepura commented 12 years ago

And the reason I was asking is that I faced the problem of working with Doctrine Common lib on Annotations and had to implement my own Metadata manager and metadata class. Since I learned this lib is used for the same purpose I thought I could somehow generalize my code. But I faced that it's not obvious on how to use it.

schmittjoh commented 12 years ago

That shows a place where it the metadata is retrieved, but if you are looking for drivers, and how the metadata is built, then you can look at these places:

olegstepura commented 12 years ago

With this I still cannot find a big picture. Even reading the tests do not help since only units are tested (it's unit testing ;)

Arkemlar commented 8 years ago

+1 for requesting more documentation. It is not intuitive/obvious how to use the library.