PHP code example of yarco / fast_gster
1. Go to this page and download the library: Download yarco/fast_gster 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/ */
yarco / fast_gster example snippets
use \Yarco\FastGster\{Base, Get, Set};
class Example03
{
use Base;
// comparing to define "getName, setName" by hand
#[Get, Set]
private string $name;
// can also add a guard, will throw an exception if the guard is not met
#[Get, Set('age > 0 and age < 120')]
private int $age;
}