Doctrine Annotations allows to implement custom annotation functionality for PHP classes. Annotations aren't implemented in PHP itself which is why this component offers a way to use the PHP doc-blocks as a place for the well known annotation syntax using the @ char. Annotations in Doctrine are used for the ORM configuration to build the class mapping, but it can be used in other projects for other purposes too. You can install the Annotation component with composer. The access to the annotations happens by reflection of the class containing them. There are multiple reader-classes implementing the Doctrine\Common\Annotations\Reader interface, that can access the annotations of a class. A common one is Doctrine\Common\Annotations\AnnotationReader. Note that AnnotationRegistry::registerLoader('class_exists') only works if you already have an autoloader configured (i.e. composer autoloader). Otherwise, please take a look to the other annotation autoload mechanisms.

Features

  • A reader has multiple methods to access the annotations of a class
  • The annotation class is declared as an annotation by @Annotation
  • An annotation class is a representation of the later used annotation configuration in classes
  • You can install the Annotation component with composer
  • Annotations in Doctrine are used for the ORM configuration to build the class mapping
  • It can be used in other projects for other purposes too

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Doctrine Annotations

Doctrine Annotations Web Site

Other Useful Business Software
$300 in Free Credit for Your Google Cloud Projects Icon
$300 in Free Credit for Your Google Cloud Projects

Build, test, and explore on Google Cloud with $300 in free credit. No hidden charges. No surprise bills.

Launch your next project with $300 in free Google Cloud credit—no hidden charges. Test, build, and deploy without risk. Use your credit across the Google Cloud platform to find what works best for your needs. After your credits are used, continue building with free monthly usage products. Only pay when you're ready to scale. Sign up in minutes and start exploring.
Start Free Trial
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Doctrine Annotations!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Text Editors, PHP Libraries

Registered

2021-09-08