for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the Zemit Framework.
*
* (c) Zemit Team <[email protected]>
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Zemit\Provider;
use LogicException;
use Phalcon\Di\DiInterface;
use Zemit\Di\Injectable;
* Class AbstractServiceProvider
* @author Julien Turbide <[email protected]>
* @copyright Zemit Team <[email protected]>
* @since 1.0
* @version 1.0
* @package Zemit\Provider
abstract class AbstractServiceProvider extends Injectable implements ServiceProviderInterface
{
* The Service name.
* @var string
protected $serviceName;
final public function __construct(DiInterface $di)
if (!$this->serviceName) {
throw new LogicException(
sprintf('The service provider defined in "%s" cannot have an empty name.', get_class($this))
);
}
$this->setDI($di);
$this->configure();
* {@inheritdoc}
* @return string
public function getName()
return $this->serviceName;
* @return void
public function boot()
public function configure()