Skip to content

Commit

Permalink
Fix for resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
VeeeneX committed Jul 28, 2015
1 parent 694d531 commit 40a04ce
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions src/Twig/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,35 @@
namespace Aurora\Twig;

use Twig_Extension;
use Aurora\Injector;
use Aurora\DI\ResolverInterface;

class Extension extends Twig_Extension
{
private $Injector;
private $Resolver;

public function __construct(Injector $Injector)
{
$this->Injector = $Injector;
}
public function __construct(ResolverInterface $Resolver)
{
$this->Resolver = $Resolver;
}

public function getName()
{
return 'Aurora';
}
public function getName()
{
return 'Aurora';
}

public function getGlobals()
{
return [
'HTML' => $this->Injector->make("Aurora\\Helper\\HTML"),
'String' => $this->Injector->make("Aurora\\Helper\\String"),
'Text' => $this->Injector->make("Aurora\\Helper\\Text"),
'Url' => $this->Injector->make("Aurora\\Helper\\Url"),
'Form' => $this->Injector->make("Aurora\\Helper\\Form"),
];
}
public function getGlobals()
{
return [
'HTML' => $this->Resolver->make("Aurora\\Helper\\HTML"),
'String' => $this->Resolver->make("Aurora\\Helper\\String"),
'Text' => $this->Resolver->make("Aurora\\Helper\\Text"),
'Url' => $this->Resolver->make("Aurora\\Helper\\Url"),
'Form' => $this->Resolver->make("Aurora\\Helper\\Form"),
];
}

public function getInjector()
{
return $this->Injector;
}
public function getResolver()
{
return $this->Resolver;
}
}

0 comments on commit 40a04ce

Please sign in to comment.