Skip to content

Separate annotation framework from standard annotation library #9

Closed

Description

@mindplay-dk

The library of standard annotations needs to become a separate (optional) package.

Activity

  1. modified the milestones: 1.2.0, on Feb 8, 2014
  2. aik099 commented on Feb 8, 2014

    @aik099
    Member

    Decided to:

    1. create a standard-annotations feature branch from master
    2. remove standard annotations from master
    3. over time implement standard annotations in standard-annotations branch
  3. aik099 commented on Feb 8, 2014

    @aik099
    Member

    Idea how to create packages from annotations classes:

    1. remove non-standard annotation-types from the main package and the registry
    2. the package of extra annotations will simply include a static class like this:
    abstract class ExtraAnnotations
    {
        public static function configure(AnnotationManager $manager)
        {
            $manager->registry['foo'] = 'Extra\FooAnnotation';
            ....
        }
    }

    To use a package developer must explicitly call the configure method like so:

    $annotationManager = new AnnotationManager();
    ExtraAnnotations::configure($annotationManager);

    Or, when annotation manager is instantiated in several places, then simply extend it and put all that configuration in it's constructor.


    Copied from #10 (comment)

  4. mindplay-dk commented on Feb 9, 2014

    @mindplay-dk
    MemberAuthor

    Idea how to create packages from annotations classes

    Yep, the static method-call to register a package of annotations, that was precisely the idea from the get-go - that's why the registry is declared public :-)

  5. aik099 commented on Feb 9, 2014

    @aik099
    Member

    You're basically approving your own comment from another issue, since it's mostly a copy-paste. But anyway good to know that you still agree with ideas you've proposed several months ago. 😉

  6. aik099 commented on Aug 17, 2014

    @aik099
    Member

    This has been done. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions