1. Go to this page and download the library: Download synapsestudios/synapse-base 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/ */
class Car extends DataObject
{
protected $object = [
'make' => null,
'model' => null,
'year' => null,
'totaled' => false,
];
}
$car = new Car(['make' => 'Toyota']);
$car->setModel('Corolla');
$car->getMake(); // Toyota
$car->getModel(); // Corolla
$car->getYear(); // null
$car->getTotaled(); // false
// These are helpful for typehinting purposes to make your code more robust
function purchaseCar(Car $car) {
// Do stuff
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.