PHP code example of hyperized / value-objects
1. Go to this page and download the library: Download hyperized/value-objects 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/ */
hyperized / value-objects example snippets
declare(strict_types=1);
use Hyperized\ValueObjects\Abstracts\Integers\AbstractInteger;
Object = MyObject::fromInteger(1337);
var_dump($myObject->getValue()); // int(1337)
declare(strict_types=1);
use Hyperized\ValueObjects\Abstracts\Strings\AbstractByteArray;
var_dump($myObject->getValue()); // string('Hello world');