sitepoint-editors / Rauth

A basic annotation-based ACL package for PHP
MIT License
41 stars 4 forks source link

[Feature] Pre-parse #9

Open Swader opened 8 years ago

Swader commented 8 years ago

Considering a helper tool which could be run on a given folder, explore it recursively, and harvest all the @auth tags. This tool could be run for optimization purposes in order to hydrate cache ( #2 ) - a fully parsed folder could then be injected into a cache instance, which is in turn injected into the Rauth instance. Thus, Rauth immediately has access to all pre-extracted auth blocks, and doesn't have to parse them or use Reflection at all.

Rauth::extractAuth could be reused for actual parsing, but still thinking about best approach to do so.