PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, proxies and much more. Class loading is an essential part of any PHP application that makes heavy use of classes and interfaces. Unfortunately, a lot of people and projects spend a lot of time and effort on custom and specialized class loading strategies. It can quickly become a pain to understand what is going on when using multiple libraries and/or frameworks, each with its own way to do class loading. Class loading should be simple and it is an ideal candidate for convention over configuration. The Doctrine Common ClassLoader implements a simple and efficient approach to class loading that is easy to understand and use. The implementation is based on the widely used and accepted convention of mapping namespace and class names to a directory structure.

Features

  • To use a Doctrine Common ClassLoader, you first need to load the class file containing the ClassLoader
  • A ClassLoader takes two constructor parameters, both optional
  • By default, a ClassLoader uses the .php file extension for all class files
  • By default, a ClassLoader uses the \ namespace separator
  • The Doctrine Common ClassLoader does not fail silently, by design
  • In the Doctrine Common ClassLoader the two responsibilities of loading a class and checking for its existence are separated

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow Doctrine Common

Doctrine Common Web Site

Other Useful Business Software
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Doctrine Common!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Libraries

Registered

2021-10-12