zendframework/zf2 — pull request #4238 by 3axap4eHko (2013-04-16 08:49:35+00:00)
Title: ValueGenerator constant detection

For example, we need to get a file like this:
```
array(
'moduleDir' => __DIR__ . '/../module'
)
);
```
but we cant pass argument __DIR__, because this constant will be parsed and replaced to value, and we must quote it '__DIR__' . And finally, after generation, we will not get this:
```
'moduleDir' => __DIR__ . '/../module'
```
generated value will be like it:
```
'moduleDir' => '__DIR__ . \'/../module\''
```
Changes:
Add ability to define environment constants by method
```
public function initEnvironmentConstants();
```
Also add ability to define custom constants by methods
```
public function addConstant($constant);
public function deleteConstant($constant)
```
property ```$constants``` must be type of ```ArrayObject``` for memory saving when pass it as argument for recursive generation by reference.