1. Go to this page and download the library: Download apie/schema-generator 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/ */
use Apie\Core\Attributes\Optional;
use Apie\Core\Dto\DtoInterface;
class ExampleDto implements DtoInterface {
string $example;
int $number = 42;
#[Optional()]
Gender $gender;
}
use Apie\Core\ValueObjects\Interfaces\StringValueObjectInterface;
use Apie\Core\ValueObjects\IsStringValueObject;
#[SchemaMethod('getSchema')]
class Example implements StringValueObject {
use IsStringValueObject;
public static function getSchema(): array
{
return [
'type' => 'string',
'format' => 'password',
'max' => 12,
];
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.