1 | <?php |
||
13 | class Reference implements ReferenceInterface { |
||
14 | /** |
||
15 | * @var string|array |
||
16 | */ |
||
17 | private $name; |
||
18 | |||
19 | /** |
||
20 | * @var array |
||
21 | */ |
||
22 | private $args; |
||
23 | |||
24 | /** |
||
25 | * Construct a new instance of the {@link Reference} class. |
||
26 | * |
||
27 | * @param string|array $name The name of the reference. |
||
28 | * @param array $args Constructor arguments for the reference. |
||
29 | */ |
||
30 | 16 | public function __construct($name, array $args = []) { |
|
34 | |||
35 | /** |
||
36 | * Get the name of the reference. |
||
37 | * |
||
38 | * @return string|array Returns the name of the reference. |
||
39 | */ |
||
40 | 1 | public function getName() { |
|
43 | |||
44 | /** |
||
45 | * Set the name of the reference. |
||
46 | * |
||
47 | * @param string|array $name The name of the reference. |
||
48 | */ |
||
49 | 16 | public function setName($name) { |
|
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | 13 | public function resolve(Container $container, $_ = null) { |
|
69 | |||
70 | /** |
||
71 | * Get constructor arguments for the the reference. |
||
72 | * |
||
73 | * @return array Returns the arguments. |
||
74 | */ |
||
75 | public function getArgs() { |
||
78 | |||
79 | /** |
||
80 | * Set constructor arguments for the the reference. |
||
81 | * |
||
82 | * @param array $args An array of arguments. |
||
83 | * @return $this |
||
84 | */ |
||
85 | 16 | public function setArgs($args) { |
|
89 | } |
||
90 |
This check marks parameter names that have not been written in camelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes
databaseConnectionString
.