File tree Expand file tree Collapse file tree 4 files changed +64
-64
lines changed Expand file tree Collapse file tree 4 files changed +64
-64
lines changed Original file line number Diff line number Diff line change 1212namespace Http \Adapter ;
1313
1414/**
15- * Allows global configurations
16- *
17- * This interface does not allow modifying options
15+ * Allows to modify configuration
1816 *
1917 * @author Márk Sági-Kazár mark.sagikazar@gmail.com>
2018 */
21- interface Configurable
19+ interface Configurable extends HasConfiguration
2220{
2321 /**
24- * Returns an option by name
25- *
26- * @param string $name
27- *
28- * @return mixed
29- */
30- public function getOption ($ name );
31-
32- /**
33- * Returns all options
34- *
35- * @return array
36- */
37- public function getOptions ();
38-
39- /**
40- * Checks if an option exists
22+ * Sets an option
4123 *
4224 * @param string $name
43- *
44- * @return boolean
25+ * @param mixed $option
4526 */
46- public function hasOption ($ name );
27+ public function setOption ($ name, $ option );
4728
4829 /**
49- * Checks if any option exists
30+ * Sets all options
5031 *
51- * @return boolean
32+ * @param array $options
5233 */
53- public function hasOptions ( );
34+ public function setOptions ( array $ options );
5435}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ * This file is part of the Http Adapter package.
5+ *
6+ * (c) Eric GELOEN <geloen.eric@gmail.com>
7+ *
8+ * For the full copyright and license information, please read the LICENSE
9+ * file that was distributed with this source code.
10+ */
11+
12+ namespace Http \Adapter ;
13+
14+ /**
15+ * Allows global configurations
16+ *
17+ * This interface does not allow modifying options
18+ *
19+ * @author Márk Sági-Kazár mark.sagikazar@gmail.com>
20+ */
21+ interface HasConfiguration
22+ {
23+ /**
24+ * Returns an option by name
25+ *
26+ * @param string $name
27+ *
28+ * @return mixed
29+ */
30+ public function getOption ($ name );
31+
32+ /**
33+ * Returns all options
34+ *
35+ * @return array
36+ */
37+ public function getOptions ();
38+
39+ /**
40+ * Checks if an option exists
41+ *
42+ * @param string $name
43+ *
44+ * @return boolean
45+ */
46+ public function hasOption ($ name );
47+
48+ /**
49+ * Checks if any option exists
50+ *
51+ * @return boolean
52+ */
53+ public function hasOptions ();
54+ }
Original file line number Diff line number Diff line change 1212namespace Http \Adapter \Message ;
1313
1414use Psr \Http \Message \RequestInterface ;
15- use Psr \Http \Configurable ;
15+ use Psr \Http \HasConfiguration ;
1616
1717/**
1818 * Allows to modify configuration in a request an immutable way
1919 *
2020 * @author Márk Sági-Kazár mark.sagikazar@gmail.com>
2121 */
22- interface ConfigurableRequest extends RequestInterface, Configurable
22+ interface ConfigurableRequest extends RequestInterface, HasConfiguration
2323{
2424 /**
2525 * Sets an option
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments