PHP code example of inok / dto
1. Go to this page and download the library: Download inok/dto 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/ */
inok / dto example snippets
/**
* @property int $id
* @property string $name
* @property string $workgroup
* @property int|null $workplace_id
* @property DateTimeImmutable|null $created_at
*/
class ComputerDTO extends HydrateDTO {
private int $id;
/** modify=mb_strtolower */
private string $name;
private string $workgroup;
private ?int $workplace_id = null;
/** sql=Y-m-d H:i:s; show=Y-m-d */
private ?DateTimeImmutable $created_at = null;
}