j4mie/idiorm — pull request #217 by redaxmedia (2014-06-22 13:36:42+00:00)
Title: Replace hard coded 'ORM' from __callStatic

Hello,

I had problems to call my method with camelCase, so I tweaked the __callStatic a bit.

The "idea" of my Db Class:

class Redaxscript_Db extends ORM
{
public static function for_prefix_table($table_name = null, $connection_name = self::DEFAULT_CONNECTION)
{
self::_setup_db($connection_name);
return new self(Redaxscript_Config::get('prefix') . $table_name, array(), $connection_name);
}
}

Calling with camelCase did not work with your hard coded 'ORM' inside __callStatic:

Redaxscript_Db::forPrefixTable(...);

I know that get_called_class() needs PHP 5.3, but this is upon you to work arround to this because I'm not used to your coding styles und stuff.

Take care