1. Go to this page and download the library: Download treehouselabs/model-config 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/ */
treehouselabs / model-config example snippets
# Project\Model\Article
class House
{
protected $type;
}
# Project\Model\Config\Field\HouseType
use TreeHouse\Model\Config\Field\Enum;
class HouseType extends Enum
{
const HOUSE = 1;
const APARTMENT = 2;
const OTHER = 3;
}
$house = new House();
$house->setType(HouseType::APARTMENT);