Posted by chx on February 16, 2013 at 8:26am
Project:
Drupal core
Introduced in branch:
8.x Description:
It is now possible to place various drivers in a directory called 'drivers' placed in the Drupal root besides core, modules etc. The PSR-0 autoloader will pick up classes from drivers/lib.
Also, the installation system can find database drivers in drivers/lib/Drupal/Driver/Database/drivername using the Drupal\Driver\Database\drivername namespace. The driver must implement all the following classes:
- Connection.php
- Delete.php
- Insert.php
- Install/Task.php
- Merge.php
- Schema.php
- Select.php
- Transaction.php
- Truncate.php
- Update.php
It is even possible to put database drivers anywhere -- the $database array in settings.php now include snamespace and it is possible to call drupal_classloader_register from settings.php. This is not a recommended practice, however. Use the designated drivers directory instead.