public static function create($name)
    {
        if (!isset(self::$_pool[$name])) {
            $classname = self::__getClassName($name);
            $path = self::__getDriverPath($name);

            if (!is_file($path)) {
                $errMsg = __('Could not find extension %s at location %s.', array(
                    '<code>' . $name . '</code>',
                    '<code>' . str_replace(DOCROOT . '/', '', $path) . '</code>'
                ));
                try {
                    Symphony::Engine()->throwCustomError(
                        $errMsg,
                        __('Symphony Extension Missing Error'),
                        Page::HTTP_STATUS_ERROR,
                        'missing_extension',
                        array(
                            'name' => $name,
                            'path' => $path
                        )
                    );
                } catch (Exception $ex) {
                    throw new Exception($errMsg, 0, $ex);
                }
            }

            if (!class_exists($classname)) {
                require_once($path);
            }

            // Create the extension object
            self::$_pool[$name] = new $classname(array());
        }

        return self::$_pool[$name];
    }
public static function create($name)
    {
        if (!isset(self::$_pool[$name])) {
            $classname = self::__getClassName($name);
            $path = self::__getDriverPath($name);

            if (!is_file($path)) {
                $errMsg = __('Could not find extension %s at location %s.', array(
                    '<code>' . $name . '</code>',
                    '<code>' . str_replace(DOCROOT . '/', '', $path) . '</code>'
                ));
                try {
                    Symphony::Engine()->throwCustomError(
                        $errMsg,
                        __('Symphony Extension Missing Error'),
                        Page::HTTP_STATUS_ERROR,
                        'missing_extension',
                        array(
                            'name' => $name,
                            'path' => $path
                        )
                    );
                } catch (Exception $ex) {
                    throw new Exception($errMsg, 0, $ex);
                }
            }

            if (!class_exists($classname)) {
                require_once($path);
            }

            // Create the extension object
            self::$_pool[$name] = new $classname(array());
        }

        return self::$_pool[$name];
    }
public static function create ( $ name ) { if ( ! isset ( self :: $ _pool [ $ name ] ) ) { $ classname = self :: __getClassName ( $ name ) ; $ path = self :: __getDriverPath ( $ name ) ; if ( ! is_file ( $ path ) ) { $ errMsg = __ ( 'Could not find extension %s at location %s.' , array ( '<code>' . $ name . '</code>' , '<code>' . str_replace ( DOCROOT . '/' , '' , $ path ) . '</code>' ) ) ; try { Symphony :: Engine ( ) -> throwCustomError ( $ errMsg , __ ( 'Symphony Extension Missing Error' ) , Page :: HTTP_STATUS_ERROR , 'missing_extension' , array ( 'name' => $ name , 'path' => $ path ) ) ; } catch ( Exception $ ex ) { throw new Exception ( $ errMsg , 0 , $ ex ) ; } } if ( ! class_exists ( $ classname ) ) { require_once ( $ path ) ; } // Create the extension object self :: $ _pool [ $ name ] = new $ classname ( array ( ) ) ; } return self :: $ _pool [ $ name ] ; }
Creates an instance of a given class and returns it

@param string $name
The name of the Extension Class minus the extension prefix.
@throws Exception
@throws SymphonyErrorPage
@return Extension
Creates an instance of a given class and returns it