* @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 } }