Skip to content

Commit 3f30cee

Browse files
committed
extensions: updated for recent nette/di
1 parent 48efc61 commit 3f30cee

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/Bridges/ApplicationDI/ApplicationExtension.php

+4-5
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,14 @@ public function beforeCompile()
8181
$container = $this->getContainerBuilder();
8282
$all = array();
8383

84-
foreach ($container->findByType('Nette\Application\IPresenter', FALSE) as $name) {
85-
$def = $container->getDefinition($name);
86-
$all[strtolower($def->getClass())] = $def;
84+
foreach ($container->findByType('Nette\Application\IPresenter') as $def) {
85+
$all[$def->getClass()] = $def;
8786
}
8887

8988
$counter = 0;
9089
foreach ($this->findPresenters() as $class) {
91-
if (empty($all[$tmp = strtolower($class)])) {
92-
$all[$tmp] = $container->addDefinition($this->prefix(++$counter))->setClass($class);
90+
if (empty($all[$class])) {
91+
$all[$class] = $container->addDefinition($this->prefix(++$counter))->setClass($class);
9392
}
9493
}
9594

src/Bridges/ApplicationDI/RoutingExtension.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function beforeCompile()
6767
public function afterCompile(Nette\PhpGenerator\ClassType $class)
6868
{
6969
if (!empty($this->config['cache'])) {
70-
$method = $class->methods[Nette\DI\Container::getMethodName($this->prefix('router'))];
70+
$method = $class->getMethod(Nette\DI\Container::getMethodName($this->prefix('router')));
7171
try {
7272
$router = serialize(eval($method->getBody()));
7373
} catch (\Exception $e) {

tests/Application/MicroPresenter.response.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class MicroContainer extends Nette\DI\Container
3333

3434
protected $meta = array(
3535
'types' => array(
36-
'nette\\bridges\\applicationlatte\\ilattefactory' => array(1 => array('latte.latteFactory')),
36+
'Nette\\Bridges\\ApplicationLatte\\ILatteFactory' => array(1 => array('latte.latteFactory')),
3737
),
3838
);
3939

0 commit comments

Comments
 (0)