Corrected typo dat to data
This commit is contained in:
parent
0e16006373
commit
a8d1d428aa
|
@ -1,8 +1,43 @@
|
|||
<?php
|
||||
|
||||
namespace KimchiAPI\Interfaces;
|
||||
namespace KimchiAPI\Interfaces;
|
||||
|
||||
interface MethodInterface
|
||||
{
|
||||
interface MethodInterface
|
||||
{
|
||||
/**
|
||||
* Returns the name of the method
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMethodName(): string;
|
||||
|
||||
}
|
||||
/**
|
||||
* Returns the path used to invoke the method
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMethod(): string;
|
||||
|
||||
/**
|
||||
* Gets a description of the method
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription(): string;
|
||||
|
||||
/**
|
||||
* Gets the version of the method
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getVersion(): string;
|
||||
|
||||
/**
|
||||
* Executes the method by passing on the parameter
|
||||
*
|
||||
* @param Request $request
|
||||
* @throws RequestException
|
||||
* @return Response
|
||||
*/
|
||||
public function execute(Request $request): Response;
|
||||
}
|
|
@ -4,9 +4,7 @@
|
|||
|
||||
// Define server information for response headers
|
||||
use KimchiAPI\Exceptions\MissingComponentsException;
|
||||
use KimchiRPC\Abstracts\ServerMode;
|
||||
use KimchiRPC\Abstracts\Types\ProtocolType;
|
||||
use KimchiRPC\Utilities\Converter;
|
||||
use KimchiAPI\Utilities\Converter;
|
||||
use RuntimeException;
|
||||
|
||||
if(defined("KIMCHI_API_SERVER") == false)
|
||||
|
@ -27,6 +25,13 @@
|
|||
|
||||
class KimchiAPI
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private array $methods;
|
||||
|
||||
private string $server_name;
|
||||
|
||||
/**
|
||||
* Server constructor.
|
||||
* @param string $server_name
|
||||
|
|
|
@ -72,10 +72,10 @@
|
|||
/**
|
||||
* Constructs object from an array representation
|
||||
*
|
||||
* @param array $dat
|
||||
* @param array $data
|
||||
* @return Request
|
||||
*/
|
||||
public static function fromArray(array $dat): Request
|
||||
public static function fromArray(array $data): Request
|
||||
{
|
||||
$request_object = new Request();
|
||||
|
||||
|
|
Loading…
Reference in New Issue