src/OaiPmh/HarvesterFactory.php
protected function getCommunicator(Client $client, array $settings,
        ResponseProcessorInterface $processor, $target
    ) {
        if (empty($settings['url'])) {
            throw new \Exception("Missing base URL for {$target}.");
        }
        $comm = new Communicator($settings['url'], $client, $processor);
        // We only want the communicator to output messages if we are in verbose
        // mode; communicator messages are considered verbose output.
        if (isset($settings['verbose']) && $settings['verbose']
            && $writer = $this->getConsoleWriter($settings)
        ) {
            $comm->setOutputWriter($writer);
        }
        return $comm;
    }
protected function getCommunicator(Client $client, array $settings,
        ResponseProcessorInterface $processor, $target
    ) {
        if (empty($settings['url'])) {
            throw new \Exception("Missing base URL for {$target}.");
        }
        $comm = new Communicator($settings['url'], $client, $processor);
        // We only want the communicator to output messages if we are in verbose
        // mode; communicator messages are considered verbose output.
        if (isset($settings['verbose']) && $settings['verbose']
            && $writer = $this->getConsoleWriter($settings)
        ) {
            $comm->setOutputWriter($writer);
        }
        return $comm;
    }
protected function getCommunicator ( Client $ client , array $ settings , ResponseProcessorInterface $ processor , $ target ) { if ( empty ( $ settings [ 'url' ] ) ) { throw new \ Exception ( "Missing base URL for {$target}." ) ; } $ comm = new Communicator ( $ settings [ 'url' ] , $ client , $ processor ) ; // We only want the communicator to output messages if we are in verbose // mode; communicator messages are considered verbose output. if ( isset ( $ settings [ 'verbose' ] ) && $ settings [ 'verbose' ] && $ writer = $ this -> getConsoleWriter ( $ settings ) ) { $ comm -> setOutputWriter ( $ writer ) ; } return $ comm ; }
Get the communicator.

@param Client                     $client    HTTP client
@param array                      $settings  Additional settings
@param ResponseProcessorInterface $processor Response processor
@param string                     $target    Target being configured (used for
error messages)

@return Communicator
Get the communicator .