2017 © Pedro Peláez
 

library annotations

Phore Annotations Abstraction

image

phore/annotations

Phore Annotations Abstraction

  • Thursday, December 1, 2016
  • by dermatthes
  • Repository
  • 1 Watchers
  • 0 Stars
  • 613 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 17 % Grown

The README.md

phore-annotations

Wrapper for Doctrine Annotaions, (*1)

Create a AnnotationPack

class AnnotationPack_Application implements GoAnnotationPack {


        /**
         * Return a Array of Annotation Classnames to be loaded
         *
         * @return string[]
         */
        public function getAnnotationClassNames() {
            return [
                Action::class,
                AllowAll::class,
                Api::class,
                Filter::class,
                Mount::class,
                Parameter::class,
                Requires::class,
                Route::class,
                ContextInit::class
            ];
        }
    }


Register the Pack

Annotations::Register(AnnotationPack_Application::class);

Access the Annotations

Annotations::ForClass(SomeClass::class);
Annotations::ForMethod(SomeClass::class, "methodName");
Annotations::ForProperty(SomeClass::class, "propertyName");

The Annotations returned are Doctrine Annotations [http://doctrine-project.com], (*2)

The Versions

01/12 2016

dev-master

9999999-dev https://getgismo.com

Phore Annotations Abstraction

  Sources   Download

MIT

The Requires

 

annotations phore