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

Commit

Permalink
#6441 - removing unused factory setter logic that makes the build crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Dec 8, 2014
1 parent 5b94c5e commit d25bc94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 2 additions & 9 deletions library/Zend/Mvc/Service/ViewPrefixPathStackResolverFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ class ViewPrefixPathStackResolverFactory implements FactoryInterface
* Create the template prefix view resolver
*
* Creates a Zend\View\Resolver\PrefixPathStackResolver and populates it with the
* ['view_manager']['prefix_template_path_stack'] and sets the default suffix with the
* ['view_manager']['default_template_suffix']
* ['view_manager']['prefix_template_path_stack']
*
* @param ServiceLocatorInterface $serviceLocator
* @return PrefixPathStackResolver
Expand All @@ -34,12 +33,6 @@ public function createService(ServiceLocatorInterface $serviceLocator)
$prefixes = $config['view_manager']['prefix_template_path_stack'];
}

$resolver = new PrefixPathStackResolver($prefixes);

if (isset($config['view_manager']['default_template_suffix'])) {
$resolver->setDefaultSuffix($config['view_manager']['default_template_suffix']);
}

return $resolver;
return new PrefixPathStackResolver($prefixes);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ public function testCreateService()
'prefix_template_path_stack' => array(
'album/' => array(),
),
'default_template_suffix' => 'php',
),
)));

$factory = new ViewPrefixPathStackResolverFactory();
$resolver = $factory->createService($serviceLocator);

$this->assertInstanceOf('Zend\View\Resolver\PrefixPathStackResolver', $resolver);
$this->assertEquals('php', $resolver->getDefaultSuffix());
}
}

0 comments on commit d25bc94

Please sign in to comment.