Object Oriented Drupal
This module is not in active development, but is intended as a proof of concept for developers interested in OOP practices within Drupal 6.
BEFORE USING THIS MODULE, PLEASE READ THE ONLINE DOCUMENTATION. THANKS.
The Droopal module offers out of the box support for writing modules in full OOP and accessing other modules via OOP. While not all developers wish to have this functionality, this module is targeted at those who do. Here are some examples of what you can do out of the box, all with zero configuration:
Access any core module using OOP:
<?php
ModNode::load()
?>This would be the equivalent of:
<?php
node_load()
?>Access any core include using OOP:
<?php
LibCommon::drupal_add_css()
?>This would be the equivalent of:
<?php
drupal_add_css();
?>Access any non-core module or include using OOP:
<?php
ModImagecache::action_save
?>This would be the equivalent of:
<?php
imagecache_action_save()
?>Write custom modules using OOP structures:
<?php
class ModMyModule {
// hook_menu
function menu() {
//etc...
}
// hook_nodeapi
function nodeapi() {
//etc...
}
}
?>The functionality to make this work is completely hidden and offered at virtually no performance hit. All existing Drupal APIs also remain completely intact.
Releases
| Official releases | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 6.x-1.2 | 2008-Sep-14 | 15.91 KB | Download · Release notes | Recommended for 6.x | |
| Development snapshots | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 6.x-1.x-dev | 2008-Sep-14 | 16.39 KB | Download · Release notes | Development snapshot | |
