Archived
1
0
Fork 0

Fixing proper namespace for app/library

This commit is contained in:
Henrik Hautakoski 2018-04-02 02:28:25 +02:00
parent cb1e40ee0a
commit aa37d10024
22 changed files with 78 additions and 62 deletions

View file

@ -1,24 +1,25 @@
<?php
namespace ViewHelper\Volt;
namespace Httpcb\ViewHelper\Volt;
use \Phalcon\Di\InjectionAwareInterface;
use Phalcon\DiInterface,
Phalcon\Di\InjectionAwareInterface;
class Extension implements InjectionAwareInterface
{
protected $_serviceKey = 'viewHelper';
protected $_serviceKey = 'HttpcbViewHelper';
/**
* @var \Phalcon\DiInterface
* @var DiInterface
*/
protected $_di;
public function __construct(\Phalcon\DiInterface $dependencyInjector)
public function __construct(DiInterface $dependencyInjector)
{
$this->_di = $dependencyInjector;
if (!$this->_di->has($this->_serviceKey)) {
$this->_di->set($this->_serviceKey, '\ViewHelper\Service', true);
$this->_di->set($this->_serviceKey, 'Httpcb\ViewHelper\Service', true);
}
}
@ -39,7 +40,7 @@ class Extension implements InjectionAwareInterface
*
* @param mixed $dependencyInjector
*/
public function setDI(\Phalcon\DiInterface $dependencyInjector)
public function setDI(DiInterface $dependencyInjector)
{
$this->_di = $dependencyInjector;
}