Skip to content

Instantly share code, notes, and snippets.

@dragoonis dragoonis/test.php Secret
Last active Dec 16, 2015

What would you like to do?
namespace TWGModule\Factory;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\ServiceManager\FactoryInterface;
use TWG\PropertyService;
class PropertyServiceFactory implements FactoryInterface
public function createService(ServiceLocatorInterface $sm)
$config = $sm->get('Config');
if(!isset($config['property_upload_path'])) {
throw new \Exception('Missing property_upload_path');
if(!isset($config['upload_path'])) {
throw new \Exception('Missing upload_path');
$uploadPath = $config['upload_path'];
$path = $config['property_upload_path'];
$svc = new PropertyService(
$svc->getImageService()->setUploadPath($uploadPath, $path);
return $svc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.