Skip to content

Commit 840b43b

Browse files
committed
Adds configurable message back
1 parent c22c46b commit 840b43b

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

src/Message/Configurable.php

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Http Adapter package.
5+
*
6+
* (c) Eric GELOEN <[email protected]>
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\Message;
13+
14+
/**
15+
* Allows to modify configuration in a message an immutable way
16+
*
17+
* @author Márk Sági-Kazár [email protected]>
18+
*/
19+
interface Configurable
20+
{
21+
/**
22+
* Returns an option by name
23+
*
24+
* @param string $name
25+
*
26+
* @return mixed
27+
*/
28+
public function getOption($name);
29+
30+
/**
31+
* Returns all options
32+
*
33+
* @return array
34+
*/
35+
public function getOptions();
36+
37+
/**
38+
* Checks if an option exists
39+
*
40+
* @param string $name
41+
*
42+
* @return boolean
43+
*/
44+
public function hasOption($name);
45+
46+
/**
47+
* Checks if any option exists
48+
*
49+
* @return boolean
50+
*/
51+
public function hasOptions();
52+
53+
/**
54+
* Sets an option
55+
*
56+
* @param string $name
57+
* @param mixed $option
58+
*
59+
* @return self
60+
*/
61+
public function withOption($name, $option);
62+
63+
/**
64+
* Removes an option
65+
*
66+
* @param string $name
67+
*
68+
* @return self
69+
*/
70+
public function withoutOption($name);
71+
}

0 commit comments

Comments
 (0)