From c223ab602cbe7f6db7321ba547164971d63d7bcd Mon Sep 17 00:00:00 2001 From: Fbenas Date: Sun, 29 Apr 2018 22:24:25 +0100 Subject: WIP --- src/Model/Vendor.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/Model/Vendor.php (limited to 'src/Model/Vendor.php') diff --git a/src/Model/Vendor.php b/src/Model/Vendor.php new file mode 100644 index 0000000..99a95dd --- /dev/null +++ b/src/Model/Vendor.php @@ -0,0 +1,49 @@ + + * @param FileHandler $handler + * @return Collection + */ + public function loadFromFile(FileHandler $handler): Collection + { + // initalise a Vendor Collection + $collection = new Collection; + + foreach ($handler->getVendorArray() as $vendorRaw) { + $collection[] = new Vendor($vendorRaw); + } + + return $collection; + } + + /** + * Filter by input + * + * @author Phil Burton + * @param Input $input + */ + public function filterByInput(Input $input) + { + // Amend the colletion so we've filtered by the input + } +} -- cgit v1.2.3