summaryrefslogtreecommitdiff
path: root/src/Script/Output.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Script/Output.php')
-rw-r--r--src/Script/Output.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Script/Output.php b/src/Script/Output.php
index e69de29..8f7a689 100644
--- a/src/Script/Output.php
+++ b/src/Script/Output.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace App\Script;
+
+use App\Model\Collection;
+
+class Output
+{
+ public function printCollection(Collection $collection)
+ {
+ if (count($collection) === 0) {
+ echo "No results found\n";
+ return;
+ }
+
+ $out = [];
+ foreach ($collection as $vendor) {
+ $out[] = implode("\n", $vendor->toString());
+ }
+
+ echo implode("\n\n", $out) . "\n";
+ }
+}