2017 © Pedro Peláez
 

library saxulum-annotation-manager

Saxulum Annotation Manager

image

saxulum/saxulum-annotation-manager

Saxulum Annotation Manager

  • Sunday, December 13, 2015
  • by dominikzogg
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,884 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 2 % Grown

The README.md

saxulum-annotation-manager

works with plain silex-php, (*1)

Build Status Total Downloads Latest Stable Version Scrutinizer Code Quality, (*2)

Features

  • An annotation manager

Requirements

  • php >=5.3
  • Doctrine Annotations >=1.1
  • Saxulum ClassFinder >=1.0
  • Symfony Finder Component >=2.3

Installation

Through Composer as [saxulum/saxulum-annotation-manager][1]., (*3)

AnnotationRegistry

Add this line after you added the autoload.php from composer, (*4)

```{.php} \Doctrine\Common\Annotations\AnnotationRegistry::registerLoader( array($loader, 'loadClass') );, (*5)


Usage ----- ### Prepare the annotation Manager ```{.php} use Doctrine\Common\Annotations\AnnotationReader; use Saxulum\AnnotationManager\Manager\AnnotationManager; $annotationReader = new AnnotationReader(); $annotationManager = new AnnotationManager($annotationReader);

ClassInfo based on paths

This will search each instantiable class within the given paths and return em as an array of Saxulum\AnnotationManager\Helper\ClassInfo instances., (*6)

```{.php} $classInfos = $annotationManager->buildClassInfosBasedOnPaths(array( dirname(DIR) . '/Classes1', dirname(DIR) . '/Classes2' ));, (*7)


### ClassInfo based on path This will search each instantiable class within the given path and return em as an array of `Saxulum\AnnotationManager\Helper\ClassInfo` instances. ```{.php} $classInfos = $annotationManager->buildClassInfosBasedOnPath( dirname(__DIR__) . '/Classes1' );

ClassInfo based on reflection classes

This will return an array of Saxulum\AnnotationManager\Helper\ClassInfo instances based on the given ReflectionClasses., (*8)

```{.php} $classInfos = $annotationManager->buildClassInfos(array( new \ReflectionClass(new TestClass1()), new \ReflectionClass(new TestClass2()) ));, (*9)


### ClassInfo based on reflection class This will return an instance of `Saxulum\AnnotationManager\Helper\ClassInfo` based on the given ReflectionClass. ```{.php} $classInfo = $annotationManager->buildClassInfo( new \ReflectionClass(new TestClass1()) );

ReflectionClasses based on path

This will search each instantiable class within the given path and return em as an array of \ReflectionClass instances., (*10)

```{.php} $reflectionClasses = AnnotationManager::getReflectionClasses( dirname(DIR) . '/Classes1' );, (*11)


### Classes based on SplFileInfo This will search each class within the given file and return em as an array of class names. ```{.php} $classes = AnnotationManager::findClassesWithinAFile( new SplFileInfo( dirname(__DIR__) . '/Classes1/TestClass1.php', '', 'TestClass1.php' ) );

The Versions

13/12 2015

dev-master

9999999-dev

Saxulum Annotation Manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

manager annotation saxulum

13/12 2015

1.2.0

1.2.0.0

Saxulum Annotation Manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

manager annotation saxulum

21/01 2015

1.1.1

1.1.1.0

Saxulum Annotation Manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

manager annotation saxulum

01/05 2014

1.1.0

1.1.0.0

Saxulum Annotation Manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

manager annotation saxulum

12/03 2014

1.0.3

1.0.3.0

Saxulum Annotation Manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

manager annotation saxulum

12/03 2014

1.0.2

1.0.2.0

Saxulum Annotation Manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

manager annotation saxulum

12/03 2014

1.0.1

1.0.1.0

Saxulum Annotation Manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

manager annotation saxulum

12/03 2014

1.0.0

1.0.0.0

Saxulum Annotation Manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

manager annotation saxulum