getDocuments() public method

Return the list of documents that will be fetched.
public getDocuments ( ) : array
return array The list of remote documents.
コード例 #1
0
ファイル: DocsOriginTest.php プロジェクト: raz0rsdge/horde
 public function testMultiple()
 {
     $this->markTestIncomplete();
     $do = __DIR__ . '/../../../fixture/docsorigin/multiple';
     $docs_origin = new Components_Helper_DocsOrigin($do, $this->_getClient());
     $this->assertEquals(array('doc/ONE' => 'http://example.com/ONE', 'doc/TEST' => 'http://example.com/TEST', 'doc/THREE' => 'http://example.com/THREE', 'doc/TWO' => 'http://example.com/TWO'), $docs_origin->getDocuments());
 }
コード例 #2
0
ファイル: Fetchdocs.php プロジェクト: horde/horde
 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));
             }
         }
     }
 }