Use camel case for plugins' classes names

This commit is contained in:
Dmitriy Simushev 2012-10-17 13:20:50 +00:00
parent 9037f69c09
commit e45a3e489f
4 changed files with 6 additions and 4 deletions

View File

@ -13,7 +13,7 @@ class EventDispatcherTest extends PHPUnit_Framework_TestCase {
protected static $plugin = null;
public static function setUpBeforeClass() {
self::$plugin = new Phpunit_autotest_plugin_managerPlugin();
self::$plugin = new PhpunitAutotestPluginManagerPlugin();
}
public static function tearDownAfterClass() {

View File

@ -3,7 +3,7 @@
/**
* Test plugin for PHPUnit tests
*/
Class Phpunit_autotest_plugin_managerPlugin extends Plugin{
Class PhpunitAutotestPluginManagerPlugin extends Plugin{
public $eventsRegistered = false;
public $listenersRegistered = false;

View File

@ -3,7 +3,7 @@
/**
* Test plugin for PHPUnit tests
*/
Class Request_processor_testPlugin extends Plugin{
Class RequestProcessorTestPlugin extends Plugin{
public $callList = array();

View File

@ -93,7 +93,9 @@ Class PluginManager {
$plugin_dependences = isset($plugin['dependences'])
? $plugin['dependences']
: array();
$plugin_classname = ucfirst($plugin_name) . "Plugin";
$plugin_name_parts = explode('_', $plugin_name);
$plugin_name_parts = array_map('ucfirst', $plugin_name_parts);
$plugin_classname = implode('', $plugin_name_parts) . "Plugin";
// Check plugin dependences
foreach ($plugin_dependences as $dependence) {
if (empty(self::$loaded_plugins[$dependence])) {