1 | <?php |
||
36 | class PropertyStreamFilterParams |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * The default pattern the variables are declared with. |
||
41 | * |
||
42 | * @var string |
||
43 | */ |
||
44 | const PATTERN = '${%s}'; |
||
45 | |||
46 | /** |
||
47 | * The pattern that declares the variables to be replaced. |
||
48 | * |
||
49 | * @var string |
||
50 | */ |
||
51 | protected $pattern; |
||
52 | |||
53 | /** |
||
54 | * The properties used for replacing the variables. |
||
55 | * |
||
56 | * @var \AppserverIo\Properties\PropertiesInterface |
||
57 | */ |
||
58 | protected $properties; |
||
59 | |||
60 | /** |
||
61 | * Initializes the params with the passed values. |
||
62 | * |
||
63 | * @param \AppserverIo\Properties\PropertiesInterface $properties The properties used for replacement |
||
64 | * @param string $pattern The pattern that declares the variables to be replaced |
||
65 | */ |
||
66 | 2 | public function __construct(PropertiesInterface $properties, $pattern = PropertyStreamFilterParams::PATTERN) |
|
71 | |||
72 | /** |
||
73 | * Return's the properties use for replacement. |
||
74 | * |
||
75 | * @return \AppserverIo\Properties\PropertiesInterface The properties |
||
76 | */ |
||
77 | 2 | public function getProperties() |
|
81 | |||
82 | /** |
||
83 | * Return's the pattern that declares the variables to be replaced. |
||
84 | * |
||
85 | * @return string The pattern |
||
86 | */ |
||
87 | 2 | public function getPattern() |
|
91 | } |
||
92 |