Skip to content

Commit 802bd51

Browse files
committed
new getCallback method
1 parent d34ccd1 commit 802bd51

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/Middleware/CallableMiddleware.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ public function __construct(callable $callback)
4444
$this->callback = $callback;
4545
}
4646

47+
/**
48+
* Gets the middleware callback
49+
*
50+
* @return callable
51+
*
52+
* @since 2.10.0
53+
*/
54+
public function getCallback() : callable
55+
{
56+
return $this->callback;
57+
}
58+
4759
/**
4860
* {@inheritdoc}
4961
*/

src/RequestHandler/CallableRequestHandler.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,18 @@ public function __construct(callable $callback)
4141
$this->callback = $callback;
4242
}
4343

44+
/**
45+
* Gets the request handler callback
46+
*
47+
* @return callable
48+
*
49+
* @since 2.10.0
50+
*/
51+
public function getCallback() : callable
52+
{
53+
return $this->callback;
54+
}
55+
4456
/**
4557
* {@inheritdoc}
4658
*/

0 commit comments

Comments
 (0)