Skip to content

Commit

Permalink
Merge pull request zendframework#5755
Browse files Browse the repository at this point in the history
  • Loading branch information
Maks3w committed Feb 19, 2014
2 parents a2ae9b9 + 8c485ad commit 3cd0e16
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions library/Zend/Form/FormAbstractServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,36 +33,36 @@ class FormAbstractServiceFactory implements AbstractFactoryInterface
/**
* Can we create the requested service?
*
* @param ServiceLocatorInterface $services
* @param ServiceLocatorInterface $serviceLocator
* @param string $name Service name (as resolved by ServiceManager)
* @param string $rName Name by which service was requested
* @param string $requestedName Name by which service was requested
* @return bool
*/
public function canCreateServiceWithName(ServiceLocatorInterface $services, $name, $rName)
public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
{
$config = $this->getConfig($services);
$config = $this->getConfig($serviceLocator);
if (empty($config)) {
return false;
}

return (isset($config[$rName]) && is_array($config[$rName]) && !empty($config[$rName]));
return (isset($config[$requestedName]) && is_array($config[$requestedName]) && !empty($config[$requestedName]));
}

/**
* Create a form
*
* @param ServiceLocatorInterface $services
* @param ServiceLocatorInterface $serviceLocator
* @param string $name Service name (as resolved by ServiceManager)
* @param string $rName Name by which service was requested
* @param string $requestedName Name by which service was requested
* @return Form
*/
public function createServiceWithName(ServiceLocatorInterface $services, $name, $rName)
public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
{
$config = $this->getConfig($services);
$config = $config[$rName];
$factory = $this->getFormFactory($services);
$config = $this->getConfig($serviceLocator);
$config = $config[$requestedName];
$factory = $this->getFormFactory($serviceLocator);

$this->marshalInputFilter($config, $services, $factory);
$this->marshalInputFilter($config, $serviceLocator, $factory);
return $factory->createForm($config);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(Di $di, $useServiceLocator = self::USE_SL_NONE)
/**
* {@inheritDoc}
*/
public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $serviceName, $requestedName)
public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
{
$this->serviceLocator = $serviceLocator;
if ($requestedName) {
Expand Down

0 comments on commit 3cd0e16

Please sign in to comment.