gianarb/zf2-psysh-module

View on GitHub
src/Service/PsyshServiceFactory.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
namespace PsyshModule\Service;

use Zend\ServiceManager\FactoryInterface;
use PsyshModule\Service\PsyshService;

class PsyshServiceFactory implements FactoryInterface
{
    public function createService(\Zend\ServiceManager\ServiceLocatorInterface $sl)
    {
        $config = $sl->get("Config");
        $isEnable = $config['psysh']['enable'];

        return new PsyshService($isEnable);
    }
}