5 * @link http://php-di.org/
6 * @copyright Matthieu Napoli (http://mnapoli.fr/)
7 * @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
10 namespace DI\Definition\Helper;
12 use DI\Definition\ArrayDefinitionExtension;
15 * Helps extending the definition of an array.
17 * For example you can add new entries to the array.
20 * @author Matthieu Napoli <matthieu@mnapoli.fr>
22 class ArrayDefinitionExtensionHelper implements DefinitionHelper
30 * @param array $values Values to add to the array.
32 public function __construct(array $values)
34 $this->values = $values;
38 * @param string $entryName Container entry name
40 * @return ArrayDefinitionExtension
42 public function getDefinition($entryName)
44 return new ArrayDefinitionExtension($entryName, $this->values);