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

Commit

Permalink
Merge branch 'feature/zendframework/zendframework#6142-setter-matchin…
Browse files Browse the repository at this point in the history
…g-performance' into feature/zendframework/zendframework#6142-classmethod-hydrator-optimization
  • Loading branch information
Ocramius committed May 10, 2014
2 parents 4ea42d7 + 3acfd27 commit 4c11ed1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Hydrator/ClassMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function extract($object)

$attribute = $method;

if (preg_match('/^get/', $method)) {
if (strpos($method, 'get') === 0) {
$attribute = substr($method, 3);
if (!property_exists($object, $attribute)) {
$attribute = lcfirst($attribute);
Expand Down

0 comments on commit 4c11ed1

Please sign in to comment.