milesj/php-decoda — Issue #6: autloading
Author: fantgeass
Created: 2012-01-24 23:06:10+00:00
State: open

Please, make your autoload class public and static.
I'm using Yii Framework and I need register external autoloading methods, but I can't because you make your autoloading method private.

```php
// make this
public function __construct($string = '') {
spl_autoload_register(array(__CLASS__, 'loadFile'));

$this->_messages = json_decode(file_get_contents(DECODA_CONFIG .'messages.json'), true);
$this->reset($string, true);
}

public static function loadFile($class) {
if (strpos($class, 'Filter') !== false) {
include_once DECODA_FILTERS . $class .'.php';

} else if (strpos($class, 'Hook') !== false) {
include_once DECODA_HOOKS . $class .'.php';
}
}

//so i can use this
Yii::registerAutoloader(array('Decoda', 'loadFile'));
```