PHP code example of jeyroik / extas-base

1. Go to this page and download the library: Download jeyroik/extas-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/ */

    

jeyroik / extas-base example snippets


use extas\interafces\IHasName;
use extas\interafces\IHasDescription;

use extas\components\THasName;
use extas\components\THasDescription;
use extas\components\parameters\THasParameters;
use extas\components\Item;

class Car extends Item implements IHasName, IHasDescription
{
    use THasName;
    use THasDescription;
}

$car = new Car([
    Car::FIELD__NAME => 'My car',
    Car::FIELD__DESCRIPTION => 'This is my car'
]);

echo $car->getName(); // 'My car'
$car->setName('Not my car');

echo $car->getDescription(); // 'This is my car'
$car->setDescription('This is not my car');