1. Go to this page and download the library: Download archee-nic/decl-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
archee-nic / decl-api example snippets
namespace App\Api;
use DeclApi\Core\Request;
class ExampleRequest extends Request
{
}
/**
* @throws \Exception
*/
protected function initRules()
{
parent::initRules();
$this->rulesInfo()->add('parameter','integer','example','Пример поля','Пример описания поля')->setDefault(10)->setAttributes('
namespace App\Api;
use DeclApi\Core\ObjectClass;
class ExampleResponse extends ObjectClass
{
}