Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Mvc / Service / ResponseFactory.php
blobfa66f8fca5733650314b4755af05c1400dedb38b
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 namespace Zend\Mvc\Service;
12 use Zend\Console\Console;
13 use Zend\Console\Response as ConsoleResponse;
14 use Zend\Http\PhpEnvironment\Response as HttpResponse;
15 use Zend\ServiceManager\FactoryInterface;
16 use Zend\ServiceManager\ServiceLocatorInterface;
18 class ResponseFactory implements FactoryInterface
20 /**
21 * Create and return a response instance, according to current environment.
23 * @param ServiceLocatorInterface $serviceLocator
24 * @return \Zend\Stdlib\Message
26 public function createService(ServiceLocatorInterface $serviceLocator)
28 if (Console::isConsole()) {
29 return new ConsoleResponse();
32 return new HttpResponse();