extension/ezjscore/classes/ezjscserverfunctionsajaxuploader.php
private static function getHandler( array $args )
    {
        if ( !isset( $args[0] ) )
        {
            throw new InvalidArgumentException(
                ezpI18n::tr(
                    'extension/ezjscore/ajaxuploader',
                    'Unable to find the identifier of ajax upload handler'
                )
            );
        }

        $http = eZHTTPTool::instance();
        $handlerData = $http->postVariable( 'AjaxUploadHandlerData', array() );

        $handlerOptions = new ezpExtensionOptions();
        $handlerOptions->iniFile = 'ezjscore.ini';
        $handlerOptions->iniSection = 'AjaxUploader';
        $handlerOptions->iniVariable = 'AjaxUploadHandler';
        $handlerOptions->handlerIndex = $args[0];
        $handlerOptions->handlerParams = $handlerData;

        $handler = eZExtension::getHandlerClass( $handlerOptions );

        if ( !$handler instanceof ezpAjaxUploaderHandlerInterface )
        {
            throw new InvalidArgumentException(
                ezpI18n::tr(
                    'extension/ezjscore/ajaxuploader',
                    'Unable to load the ajax upload handler'
                )
            );
        }
        return $handler;
    }
private static function getHandler( array $args )
    {
        if ( !isset( $args[0] ) )
        {
            throw new InvalidArgumentException(
                ezpI18n::tr(
                    'extension/ezjscore/ajaxuploader',
                    'Unable to find the identifier of ajax upload handler'
                )
            );
        }

        $http = eZHTTPTool::instance();
        $handlerData = $http->postVariable( 'AjaxUploadHandlerData', array() );

        $handlerOptions = new ezpExtensionOptions();
        $handlerOptions->iniFile = 'ezjscore.ini';
        $handlerOptions->iniSection = 'AjaxUploader';
        $handlerOptions->iniVariable = 'AjaxUploadHandler';
        $handlerOptions->handlerIndex = $args[0];
        $handlerOptions->handlerParams = $handlerData;

        $handler = eZExtension::getHandlerClass( $handlerOptions );

        if ( !$handler instanceof ezpAjaxUploaderHandlerInterface )
        {
            throw new InvalidArgumentException(
                ezpI18n::tr(
                    'extension/ezjscore/ajaxuploader',
                    'Unable to load the ajax upload handler'
                )
            );
        }
        return $handler;
    }
private static function getHandler ( array $ args ) { if ( ! isset ( $ args [ 0 ] ) ) { throw new InvalidArgumentException ( ezpI18n :: tr ( 'extension/ezjscore/ajaxuploader' , 'Unable to find the identifier of ajax upload handler' ) ) ; } $ http = eZHTTPTool :: instance ( ) ; $ handlerData = $ http -> postVariable ( 'AjaxUploadHandlerData' , array ( ) ) ; $ handlerOptions = new ezpExtensionOptions ( ) ; $ handlerOptions -> iniFile = 'ezjscore.ini' ; $ handlerOptions -> iniSection = 'AjaxUploader' ; $ handlerOptions -> iniVariable = 'AjaxUploadHandler' ; $ handlerOptions -> handlerIndex = $ args [ 0 ] ; $ handlerOptions -> handlerParams = $ handlerData ; $ handler = eZExtension :: getHandlerClass ( $ handlerOptions ) ; if ( ! $ handler instanceof ezpAjaxUploaderHandlerInterface ) { throw new InvalidArgumentException ( ezpI18n :: tr ( 'extension/ezjscore/ajaxuploader' , 'Unable to load the ajax upload handler' ) ) ; } return $ handler ; }
Returns an ajaxuploader handler instance from the ezjscore function
arguments.

@param array $args the arguments of the ezjscore ajax function
@return ezpAjaxUploaderHandlerInterface

@throws InvalidArgumentException if the handler cannot be instanciated
Returns an ajaxuploader handler instance from the ezjscore function arguments .