protected function configToolProvider(ConfigXML $config)
    {
        $handlers = $config->toArray('/config/tool/handlers')[0];
        if (empty($handlers) || !is_array($handlers)) {
            throw new ConfigurationException(
                'At least one handler/URL pair must be specified',
                ConfigurationException::TOOL_PROVIDER
            );
        }
        foreach ($handlers as $request => $path) {
            $handlers[$request] = DataUtilities::URLfromPath(
                dirname($this->config(static::TOOL_CONFIG_FILE)) . "/$path"
            );
        }
        $this->config(static::TOOL_HANDLER_URLS, $handlers);
        $this->log('Tool provider handler URLs configured');
    }
protected function configToolProvider(ConfigXML $config)
    {
        $handlers = $config->toArray('/config/tool/handlers')[0];
        if (empty($handlers) || !is_array($handlers)) {
            throw new ConfigurationException(
                'At least one handler/URL pair must be specified',
                ConfigurationException::TOOL_PROVIDER
            );
        }
        foreach ($handlers as $request => $path) {
            $handlers[$request] = DataUtilities::URLfromPath(
                dirname($this->config(static::TOOL_CONFIG_FILE)) . "/$path"
            );
        }
        $this->config(static::TOOL_HANDLER_URLS, $handlers);
        $this->log('Tool provider handler URLs configured');
    }
protected function configToolProvider ( ConfigXML $ config ) { $ handlers = $ config -> toArray ( '/config/tool/handlers' ) [ 0 ] ; if ( empty ( $ handlers ) || ! is_array ( $ handlers ) ) { throw new ConfigurationException ( 'At least one handler/URL pair must be specified' , ConfigurationException :: TOOL_PROVIDER ) ; } foreach ( $ handlers as $ request => $ path ) { $ handlers [ $ request ] = DataUtilities :: URLfromPath ( dirname ( $ this -> config ( static :: TOOL_CONFIG_FILE ) ) . "/$path" ) ; } $ this -> config ( static :: TOOL_HANDLER_URLS , $ handlers ) ; $ this -> log ( 'Tool provider handler URLs configured' ) ; }
Configure tool provider object from configuration file
@param ConfigXML $config Configuration file object
@return void
Configure tool provider object from configuration file