symfony/symfony — pull request #9717 by Halleck45 (2013-12-06 18:40:28+00:00)
Title: [ExpressionLanguage] way to use getters for private attributes

| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | No
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |

This patch uses the PropertyAccess component in order to use getter strategy when private attribute is read:

```php
class User {
private $age = 27;

public function getAge()
{
return $this->age;
}
}

$language = new \Symfony\Component\ExpressionLanguage\ExpressionLanguage();
$language->evaluate('user.age > 10', ['user' => new User]); // true
```