for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LWS\Import;
class Factory
{
public function __construct()
$this->namespace = config('import.namespace');
namespace
}
public function make($source)
$source = ucfirst(strtolower($source));
$name = $this->namespace.'\\'.$source;
if (class_exists($name)) {
return new $name();