예제 #1
0
 /**
  * List all Documents
  *
  *
  * @param string  $database Name of the database to list
  * @param boolean $v Display the Documents body
  */
 public function showDocumentsCommand($database = '', $v = FALSE)
 {
     if ($database) {
         $documents = $this->documentRepository->findByDatabase($database);
     } else {
         $documents = $this->documentRepository->findAllIgnoreDatabase();
     }
     foreach ($documents as $document) {
         $this->showDocument($document, $v);
     }
 }
예제 #2
0
 /**
  * List all Documents
  *
  * @param string $database Name of the database to list
  * @param bool $full Display the Documents body
  */
 public function showDocumentsCommand($database = '', $full = FALSE)
 {
     if ($database) {
         $documents = $this->documentRepository->findByDatabase($database);
     } else {
         $documents = $this->documentRepository->findAllIgnoreDatabase();
     }
     if ($documents) {
         foreach ($documents as $document) {
             $this->showDocument($document, $full);
         }
     } else {
         $this->outputLine($database ? sprintf('No documents found in database "%s"', $database) : 'No documents found');
     }
 }