-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathParameterBagInterface.php
More file actions
96 lines (84 loc) · 1.99 KB
/
ParameterBagInterface.php
File metadata and controls
96 lines (84 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php
namespace Nuxia\Component\Config;
/**
* ParameterBagInterface
*
* @author Yannick Snobbert <yannick.snobbert@gmail.com>
*/
interface ParameterBagInterface
{
/**
* Returns the parameters.
*
* @return array An array of parameters
*/
public function all();
/**
* Returns the parameter keys.
*
* @return array An array of parameter keys
*/
public function keys();
/**
* Adds parameters.
*
* @param array $parameters An array of parameters
*/
public function add(array $parameters = array());
/**
* Returns a parameter by name.
*
* @param string $path The key
* @param mixed $default The default value if the parameter key does not exist
* @param bool $deep If true, a path like foo[bar] will find deeper items
*
* @return mixed
*
* @throws \InvalidArgumentException
*/
public function get($path, $default = null, $deep = false);
/**
* Sets a parameter by name.
*
* @param string $key The key
* @param mixed $value The value
*/
public function set($key, $value);
/**
* Returns true if the parameter is defined.
*
* @param string $key The key
*
* @return bool true if the parameter exists, false otherwise
*/
public function has($key);
/**
* Removes a parameter.
*
* @param string $key The key
*/
public function remove($key);
/**
* Returns the number of parameters.
*
* @return int The number of parameters
*/
public function count();
/**
* @param string $key
* @param mixed $value
*/
public function setIfNotSet($key, $value);
/**
* @param array $parameters
* @param bool|null $override
*
* @return mixed
*/
public function addIfNotSet(array $parameters = array());
/**
* @param array $keys
* @return array
*/
public function filterByKeys(array $keys);
}