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

Commit

Permalink
Rename service to "MvcTranslator"
Browse files Browse the repository at this point in the history
- Removes conflict with ZendSkeletonApplication, which defines a "translator"
  service already.
  • Loading branch information
weierophinney committed May 3, 2013
1 parent d668728 commit 8ac24fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library/Zend/Mvc/Service/ServiceListenerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ class ServiceListenerFactory implements FactoryInterface
'HttpViewManager' => 'Zend\Mvc\Service\HttpViewManagerFactory',
'HydratorManager' => 'Zend\Mvc\Service\HydratorManagerFactory',
'InputFilterManager' => 'Zend\Mvc\Service\InputFilterManagerFactory',
'MvcTranslator' => 'Zend\Mvc\Service\TranslatorServiceFactory',
'PaginatorPluginManager' => 'Zend\Mvc\Service\PaginatorPluginManagerFactory',
'Request' => 'Zend\Mvc\Service\RequestFactory',
'Response' => 'Zend\Mvc\Service\ResponseFactory',
'Router' => 'Zend\Mvc\Service\RouterFactory',
'RoutePluginManager' => 'Zend\Mvc\Service\RoutePluginManagerFactory',
'SerializerAdapterManager' => 'Zend\Mvc\Service\SerializerAdapterPluginManagerFactory',
'Translator' => 'Zend\Mvc\Service\TranslatorServiceFactory',
'ValidatorManager' => 'Zend\Mvc\Service\ValidatorManagerFactory',
'ViewHelperManager' => 'Zend\Mvc\Service\ViewHelperManagerFactory',
'ViewFeedRenderer' => 'Zend\Mvc\Service\ViewFeedRendererFactory',
Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Validator/ValidatorPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ public function injectTranslator($validator)
{
if ($validator instanceof Translator\TranslatorAwareInterface) {
$locator = $this->getServiceLocator();
if ($locator && $locator->has('translator')) {
$validator->setTranslator($locator->get('translator'));
if ($locator && $locator->has('MvcTranslator')) {
$validator->setTranslator($locator->get('MvcTranslator'));
}
}
}
Expand Down

3 comments on commit 8ac24fb

@danizord
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weierophinney Why do not you updated the HelperPluginManager too?

@weierophinney
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danizord Because apparently I missed that. That said, in most applications, it should not be an issue as translator is an alias to MvcTranslator. I'll provide an update, however.

@weierophinney
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danizord Please see #4870

Please sign in to comment.