PHP code example of orka / json-decodable
1. Go to this page and download the library: Download orka/json-decodable 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/ */
orka / json-decodable example snippets
namespace Model;
use Traits\JsonDecodable; # +Add
class Color
{
use JsonDecodable; # +Add
private string $name;
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
# optionnal: You can define the PI
];
}
}