static public function getClass( $key )
{
/* Do some magic here to retreive common classes without
having to initialize them first */
if ( ! isset( self::$classes[ $key ] ) )
{
switch( $key )
{
default:
throw new Exception( "$key is not an object" );
break;
case 'class_captcha':
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classCaptcha.php', 'classCaptcha' );
self::$classes['class_captcha'] = new $classToLoad( self::instance() );
break;
case 'templateEngine':
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classTemplateEngine.php', 'classTemplate' );
self::$classes['templateEngine'] = new $classToLoad( IPS_ROOT_PATH . 'sources/template_plugins' );
break;
Ja mam tak.