Browse Source

fix namespace

main 1.0.0
ghost 10 months ago
parent
commit
050b444e92
  1. 6
      README.md
  2. 2
      src/Request.php
  3. 2
      src/Response.php
  4. 8
      src/Server.php

6
README.md

@ -17,15 +17,15 @@ Gemini Protocol library for PHP 8
``` ```
<?php <?php
$server = new \YGGverse\TitanII\Server(); $server = new \Yggverse\TitanII\Server();
$server->setCert('cert.pem'); $server->setCert('cert.pem');
$server->setKey('key.rsa'); $server->setKey('key.rsa');
$server->setHandler( $server->setHandler(
function (\YGGverse\TitanII\Request $request): \YGGverse\TitanII\Response function (\Yggverse\TitanII\Request $request): \Yggverse\TitanII\Response
{ {
$response = new \YGGverse\TitanII\Response(); $response = new \Yggverse\TitanII\Response();
$response->setCode(20); $response->setCode(20);
$response->setMeta('text/plain'); $response->setMeta('text/plain');

2
src/Request.php

@ -1,6 +1,6 @@
<?php <?php
namespace YGGverse\TitanII; namespace Yggverse\TitanII;
/** /**
* Gemini Request * Gemini Request

2
src/Response.php

@ -1,6 +1,6 @@
<?php <?php
namespace YGGverse\TitanII; namespace Yggverse\TitanII;
/** /**
* Gemini Response * Gemini Response

8
src/Server.php

@ -1,6 +1,6 @@
<?php <?php
namespace YGGverse\TitanII; namespace Yggverse\TitanII;
/** /**
* Gemini Server * Gemini Server
@ -54,9 +54,9 @@ class Server {
* *
* Parameter 1 Callable is expected to handle the following: * Parameter 1 Callable is expected to handle the following:
* *
* @param \YGGverse\TitanII\Request * @param \Yggverse\TitanII\Request
* *
* @return \YGGverse\TitanII\Response * @return \Yggverse\TitanII\Response
*/ */
public function setHandler(callable $handler): self public function setHandler(callable $handler): self
{ {
@ -158,7 +158,7 @@ class Server {
stream_set_blocking($incoming, false); stream_set_blocking($incoming, false);
$request = new \YGGverse\TitanII\Request($body); $request = new \Yggverse\TitanII\Request($body);
$response = call_user_func($this->handler, $request); $response = call_user_func($this->handler, $request);

Loading…
Cancel
Save