public function run()
{
$docs_origin = $this->_config->getComponent()->getDocumentOrigin();
if ($docs_origin === null) {
$this->_output->fail('The component does not offer a DOCS_ORIGIN file with instructions what should be fetched!');
return;
} else {
$this->_output->info(sprintf('Reading instructions from %s', $docs_origin[0]));
$options = $this->_config->getOptions();
$helper = new Components_Helper_DocsOrigin($docs_origin, $this->_client);
if (empty($options['pretend'])) {
$helper->fetchDocuments($this->_output);
} else {
foreach ($helper->getDocuments() as $remote => $local) {
$this->_output->info(sprintf('Would fetch remote %s into %s!', $remote, $docs_origin[1] . '/' . $local));
}
}
}
}