public function make($pathToFile, $type = 'zip')
{
$new = $this->createArchiveFile($pathToFile);
$this->filePath = $pathToFile;
$name = 'Chumper\\Zipper\\Repositories\\' . ucwords($type) . 'Repository';
if (is_subclass_of($name, 'Chumper\\Zipper\\Repositories\\RepositoryInterface')) {
$this->repository = new $name($pathToFile, $new);
} else {
//TODO $type should be a class name and not a string
$this->repository = $type;
}
return $this;
}