b6949527c8ed5e581c7ff61c1f8177193800118a
[GitHub/WoltLab/WCF.git] /
1 <?php
2 /**
3 * PHP-DI
4 *
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)
8 */
9
10 namespace DI\Definition\Helper;
11
12 use DI\Definition\StringDefinition;
13
14 /**
15 * @since 5.0
16 * @author Matthieu Napoli <matthieu@mnapoli.fr>
17 */
18 class StringDefinitionHelper implements DefinitionHelper
19 {
20 /**
21 * @var string
22 */
23 private $expression;
24
25 public function __construct($expression)
26 {
27 $this->expression = $expression;
28 }
29
30 /**
31 * @param string $entryName Container entry name
32 *
33 * @return StringDefinition
34 */
35 public function getDefinition($entryName)
36 {
37 return new StringDefinition($entryName, $this->expression);
38 }
39 }