Skip to content

Commit c26d86e

Browse files
committed
getEndpoint method
1 parent 2078014 commit c26d86e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/VerifierServer/Server.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
use SS14\Endpoints\OAuth2Endpoint as SS14OAuth2Endpoint;
1919
use VerifierServer\Endpoints\Interfaces\EndpointInterface;
2020
//use VerifierServer\Endpoints\USPSEndpoint;
21-
use VerifierServer\Endpoints\VerifiedEndpoint;
2221
use VerifierServer\Endpoints\SS14VerifiedEndpoint;
22+
use VerifierServer\Endpoints\VerifiedEndpoint;
2323
use VerifierServer\Traits\HttpMethodsTrait;
2424

2525
use Exception;
@@ -309,6 +309,13 @@ public function handleEndpoint(
309309
}
310310
}
311311

312+
public function getEndpoint(string $uri): ?EndpointInterface
313+
{
314+
return (isset($this->endpoints[$uri]) && $this->endpoints[$uri] instanceof EndpointInterface)
315+
? $this->endpoints[$uri]
316+
: null;
317+
}
318+
312319
/**
313320
* Handles an incoming resource request from a client and generates appropriate responses.
314321
*

0 commit comments

Comments
 (0)