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
Get the most trusted enterprise browser Icon
Get the most trusted enterprise browser

Advanced built-in security helps IT prevent breaches before they happen

Defend against security incidents with Chrome Enterprise. Create customizable controls, manage extensions and set proactive alerts to keep your data and employees protected without slowing down productivity.
Download Chrome
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