Skip to content

Commit 9909873

Browse files
committed
Add docblocks to public methods
1 parent c46aaeb commit 9909873

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

src/Server.php

+35
Original file line numberDiff line numberDiff line change
@@ -60,36 +60,71 @@ public function listen(ServerInterface $socket, callable $callback = null, Strat
6060
$httpServer->listen($socket);
6161
}
6262

63+
/**
64+
* Add a callback to the to be added path for the GET method
65+
* @param string $path
66+
* @param callable $callable
67+
*/
6368
public function get(string $path, callable $callable)
6469
{
6570
$this->functions['get'][$path] = $callable;
6671
}
6772

73+
/**
74+
* Add a callback to the to be added path for the POST method
75+
* @param string $path
76+
* @param callable $callable
77+
*/
6878
public function post(string $path, callable $callable)
6979
{
7080
$this->functions['post'][$path] = $callable;
7181
}
7282

83+
/**
84+
* Add a callback to the to be added path for the PUT method
85+
* @param string $path
86+
* @param callable $callable
87+
*/
7388
public function put(string $path, callable $callable)
7489
{
7590
$this->functions['put'][$path] = $callable;
7691
}
7792

93+
/**
94+
* Add a callback to the to be added path for the DELETE method
95+
* @param string $path
96+
* @param callable $callable
97+
*/
7898
public function delete(string $path, callable $callable)
7999
{
80100
$this->functions['delete'][$path] = $callable;
81101
}
82102

103+
/**
104+
* Add a callback to the to be added path for the HEAD method
105+
* @param string $path
106+
* @param callable $callable
107+
*/
83108
public function head(string $path, callable $callable)
84109
{
85110
$this->functions['head'][$path] = $callable;
86111
}
87112

113+
/**
114+
* Add a callback to the to be added path for the OPTIONS method
115+
* @param string $path
116+
* @param callable $callable
117+
*/
88118
public function options(string $path, callable $callable)
89119
{
90120
$this->functions['options'][$path] = $callable;
91121
}
92122

123+
/**
124+
* Add a callback to the to be added path for the TRACE method
125+
* @param string $path
126+
* @param callable $callable
127+
*/
93128
public function trace(string $path, callable $callable)
94129
{
95130
$this->functions['trace'][$path] = $callable;

0 commit comments

Comments
 (0)