Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.

Commit

Permalink
Show file tree
Hide file tree
Showing 24 changed files with 167 additions and 110 deletions.
5 changes: 0 additions & 5 deletions src/AbstractFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager;

/**
* @category Zend
* @package Zend_ServiceManager
*/
interface AbstractFactoryInterface
{
/**
Expand Down
10 changes: 1 addition & 9 deletions src/AbstractPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager;
Expand All @@ -19,9 +18,6 @@
* the plugin when retrieved. Finally, enables the allowOverride property by
* default to allow registering factories, aliases, and invokables to take
* the place of those provided by the implementing class.
*
* @category Zend
* @package Zend_ServiceManager
*/
abstract class AbstractPluginManager extends ServiceManager implements ServiceLocatorAwareInterface
{
Expand All @@ -30,7 +26,7 @@ abstract class AbstractPluginManager extends ServiceManager implements ServiceLo
*
* @var bool
*/
protected $allowOverride = true;
protected $allowOverride = true;

/**
* Whether or not to auto-add a class as an invokable class if it exists
Expand Down Expand Up @@ -69,9 +65,6 @@ public function __construct(ConfigInterface $configuration = null)
if ($instance instanceof ServiceLocatorAwareInterface) {
$instance->setServiceLocator($self);
}
if ($instance instanceof ServiceManagerAwareInterface) {
$instance->setServiceManager($self);
}
});
}

Expand Down Expand Up @@ -218,5 +211,4 @@ protected function createFromFactory($canonicalName, $requestedName)

return $instance;
}

}
6 changes: 0 additions & 6 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager;

/**
* @category Zend
* @package Zend_ServiceManager
*/
class Config implements ConfigInterface
{
/**
Expand Down Expand Up @@ -151,5 +146,4 @@ public function configureServiceManager(ServiceManager $serviceManager)
$serviceManager->setShared($name, $isShared);
}
}

}
5 changes: 0 additions & 5 deletions src/ConfigInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager;

/**
* @category Zend
* @package Zend_ServiceManager
*/
interface ConfigInterface
{
/**
Expand Down
1 change: 0 additions & 1 deletion src/Di/DiAbstractServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager\Di;
Expand Down
1 change: 0 additions & 1 deletion src/Di/DiInstanceManagerProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager\Di;
Expand Down
2 changes: 0 additions & 2 deletions src/Di/DiServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager\Di;
Expand Down Expand Up @@ -120,5 +119,4 @@ public function get($name, array $params = array())
}

}

}
2 changes: 0 additions & 2 deletions src/Di/DiServiceInitializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager\Di;
Expand Down Expand Up @@ -65,5 +64,4 @@ public function initialize($instance, ServiceLocatorInterface $serviceLocator)
throw $e;
}
}

}
6 changes: 0 additions & 6 deletions src/Exception/CircularDependencyFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager\Exception;

/**
* @category Zend
* @package Zend_ServiceManager
* @subpackage Exception
*/
class CircularDependencyFoundException extends RuntimeException
{
}
6 changes: 0 additions & 6 deletions src/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager\Exception;

/**
* @category Zend
* @package Zend_ServiceManager
* @subpackage Exception
*/
interface ExceptionInterface
{
}
6 changes: 0 additions & 6 deletions src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager\Exception;

/**
* @category Zend
* @package Zend_ServiceManager
* @subpackage Exception
*/
class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
{
}
6 changes: 0 additions & 6 deletions src/Exception/InvalidServiceNameException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager\Exception;

/**
* @category Zend
* @package Zend_ServiceManager
* @subpackage Exception
*/
class InvalidServiceNameException extends RuntimeException
{
}
6 changes: 0 additions & 6 deletions src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager\Exception;

/**
* @category Zend
* @package Zend_ServiceManager
* @subpackage Exception
*/
class RuntimeException extends \RuntimeException implements ExceptionInterface
{
}
6 changes: 0 additions & 6 deletions src/Exception/ServiceNotCreatedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager\Exception;

/**
* @category Zend
* @package Zend_ServiceManager
* @subpackage Exception
*/
class ServiceNotCreatedException extends RuntimeException
{
}
6 changes: 0 additions & 6 deletions src/Exception/ServiceNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager\Exception;

/**
* @category Zend
* @package Zend_ServiceManager
* @subpackage Exception
*/
class ServiceNotFoundException extends InvalidArgumentException
{
}
5 changes: 0 additions & 5 deletions src/FactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager;

/**
* @category Zend
* @package Zend_ServiceManager
*/
interface FactoryInterface
{
/**
Expand Down
5 changes: 0 additions & 5 deletions src/InitializerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager;

use Zend\ServiceManager\ServiceLocatorInterface;

/**
* @category Zend
* @package Zend_ServiceManager
*/
interface InitializerInterface
{
/**
Expand Down
5 changes: 0 additions & 5 deletions src/ServiceLocatorAwareInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager;

/**
* @category Zend
* @package Zend_ServiceManager
*/
interface ServiceLocatorAwareInterface
{
/**
Expand Down
43 changes: 43 additions & 0 deletions src/ServiceLocatorAwareTrait.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\ServiceManager;

use Zend\ServiceManager\ServiceLocatorInterface;

trait ServiceLocatorAwareTrait
{
/**
* @var ServiceLocator
*/
protected $serviceLocator = null;

/**
* Set service locator
*
* @param ServiceLocatorInterface $serviceLocator
* @return mixed
*/
public function setServiceLocator(ServiceLocatorInterface $serviceLocator)
{
$this->serviceLocator = $serviceLocator;

return $this;
}

/**
* Get service locator
*
* @return ServiceLocator
*/
public function getServiceLocator()
{
return $this->serviceLocator;
}
}
4 changes: 0 additions & 4 deletions src/ServiceLocatorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@
* @link https://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_ServiceManager
*/

namespace Zend\ServiceManager;

/**
* Service locator interface
*
* @category Zend
* @package Zend_ServiceManager
*/
interface ServiceLocatorInterface
{
Expand Down
Loading

0 comments on commit 0c71387

Please sign in to comment.