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

Commit

Permalink
phpro hydrators use strategies not hydrator_strategies
Browse files Browse the repository at this point in the history
  • Loading branch information
TomHAnderson committed Nov 5, 2014
1 parent 9c73295 commit a3283aa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Admin/Model/DoctrineRestServiceEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function getArrayCopy()
$data['hydrator_name'] = $this->hydratorName;
$data['object_manager'] = $this->objectManager;
$data['by_value'] = $this->byValue;
$data['hydrator_strategies'] = $this->hydratorStrategies;
$data['strategies'] = $this->hydratorStrategies;
$data['use_generated_hydrator'] = $this->useGeneratedHydrator;

return $data;
Expand Down
6 changes: 3 additions & 3 deletions src/Admin/Model/DoctrineRestServiceModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class DoctrineRestServiceModel implements EventManagerAwareInterface, ServiceMan
'objectManager' => 'object_manager',
'byValue' => 'by_value',
'useGeneratedHydrator' => 'use_generated_hydrator',
'hydratorStrategies' => 'hydrator_strategies',
'hydratorStrategies' => 'strategies',
);

/**
Expand Down Expand Up @@ -783,7 +783,7 @@ public function createDoctrineHydratorConfig(DoctrineRestServiceEntity $details,

// Verify the object manager exists
$objectManager = $this->getServiceManager()->get($details->objectManager);
$hydratorStrategies = (isset($entityValue['hydrator_strategies'])) ? $entityValue['hydrator_strategies']: array();
$hydratorStrategies = (isset($entityValue['strategies'])) ? $entityValue['strategies']: array();

foreach ($hydratorStrategies as $strategy) {
if (!$this->getServiceManager()->has($strategy)) {
Expand All @@ -800,7 +800,7 @@ public function createDoctrineHydratorConfig(DoctrineRestServiceEntity $details,
'entity_class' => $entityClass,
'object_manager' => $details->objectManager,
'by_value' => $entityValue['by_value'],
'hydrator_strategies' => $hydratorStrategies,
'strategies' => $hydratorStrategies,
'use_generated_hydrator' => $entityValue['use_generated_hydrator'],
),
),
Expand Down
2 changes: 1 addition & 1 deletion src/Admin/Model/NewDoctrineServiceEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function getArrayCopy()
$data['hydrator_name'] = $this->hydratorName;
$data['by_value'] = $this->byValue;
$data['entity_identifier_name'] = $this->entityIdentifierName;
$data['hydrator_strategies'] = $this->hydratorStrategies;
$data['strategies'] = $this->hydratorStrategies;
$data['use_generated_hydrator'] = $this->useGeneratedHydrator;

return $data;
Expand Down

0 comments on commit a3283aa

Please sign in to comment.