Skip to content

Commit fa47f3e

Browse files
e1himselfGromNaN
authored andcommitted
Add method doc comments to sfServiceContainerInterface
1 parent 8969c56 commit fa47f3e

File tree

1 file changed

+74
-9
lines changed

1 file changed

+74
-9
lines changed

lib/service/sfServiceContainerInterface.class.php

Lines changed: 74 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,86 @@
1818
*/
1919
interface sfServiceContainerInterface
2020
{
21+
/**
22+
* Sets the service container parameters.
23+
* All previously defined parameters would be removed.
24+
*
25+
* @see addParameters()
26+
*
27+
* @param array $parameters An array of parameters
28+
*/
2129
public function setParameters(array $parameters);
22-
30+
31+
/**
32+
* Adds parameters to the service container parameters.
33+
*
34+
* @param array $parameters An array of parameters
35+
*/
2336
public function addParameters(array $parameters);
24-
37+
38+
/**
39+
* Gets the service container parameters.
40+
*
41+
* @return array An array of parameters
42+
*/
2543
public function getParameters();
26-
44+
45+
/**
46+
* Gets a service container parameter.
47+
*
48+
* @param string $name The parameter name
49+
*
50+
* @return mixed The parameter value
51+
*
52+
* @throw InvalidArgumentException if the parameter is not defined
53+
*/
2754
public function getParameter($name);
28-
55+
56+
/**
57+
* Sets a service container parameter.
58+
*
59+
* @param string $name The parameter name
60+
* @param mixed $value The parameter value
61+
*/
2962
public function setParameter($name, $value);
30-
63+
64+
/**
65+
* Returns true if a parameter name is defined.
66+
*
67+
* @param string $name The parameter name
68+
*
69+
* @return Boolean true if the parameter name is defined, false otherwise
70+
*/
3171
public function hasParameter($name);
32-
72+
73+
/**
74+
* Sets a service.
75+
*
76+
* @param string $id The service identifier
77+
* @param object $service The service instance
78+
*/
3379
public function setService($id, $service);
34-
80+
81+
/**
82+
* Gets a service.
83+
*
84+
* If a service is both defined through a setService() method and
85+
* with a set*Service() method, the former has always precedence.
86+
*
87+
* @param string $id The service identifier
88+
*
89+
* @return object The associated service
90+
*
91+
* @throw InvalidArgumentException if the service is not defined
92+
*/
3593
public function getService($id);
36-
37-
public function hasService($name);
94+
95+
/**
96+
* Returns true if the given service is defined.
97+
*
98+
* @param string $id The service identifier
99+
*
100+
* @return Boolean true if the service is defined, false otherwise
101+
*/
102+
public function hasService($id);
38103
}

0 commit comments

Comments
 (0)