public static function create($handle, array $env = null)
    {
        $classname = self::__getClassName($handle);
        $path = self::__getDriverPath($handle);

        if (!is_file($path)) {
            throw new Exception(
                __('Could not find Event %s.', array('<code>' . $handle . '</code>'))
                . ' ' . __('If it was provided by an Extension, ensure that it is installed, and enabled.')
            );
        }

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

        return new $classname($env);
    }
public static function create($handle, array $env = null)
    {
        $classname = self::__getClassName($handle);
        $path = self::__getDriverPath($handle);

        if (!is_file($path)) {
            throw new Exception(
                __('Could not find Event %s.', array('<code>' . $handle . '</code>'))
                . ' ' . __('If it was provided by an Extension, ensure that it is installed, and enabled.')
            );
        }

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

        return new $classname($env);
    }
public static function create ( $ handle , array $ env = null ) { $ classname = self :: __getClassName ( $ handle ) ; $ path = self :: __getDriverPath ( $ handle ) ; if ( ! is_file ( $ path ) ) { throw new Exception ( __ ( 'Could not find Event %s.' , array ( '<code>' . $ handle . '</code>' ) ) . ' ' . __ ( 'If it was provided by an Extension, ensure that it is installed, and enabled.' ) ) ; } if ( ! class_exists ( $ classname ) ) { require_once $ path ; } return new $ classname ( $ env ) ; }
Creates an instance of a given class and returns it.

@param string $handle
The handle of the Event to create
@param array $env
The environment variables from the Frontend class which includes
any params set by Symphony or Datasources or by other Events
@throws Exception
@return Event
Creates an instance of a given class and returns it .