PHP code example of originphp / configurable
1. Go to this page and download the library: Download originphp/configurable 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/ */
originphp / configurable example snippets
use Origin\Configurable\InstanceConfigurable as Configurable;
class MyObject
{
use Configurable;
protected $defaultConfig = [
'foo' => 'bar'
];
}
$value = $this->config('foo'); // bar
$array = $this->config();
$this->config('foo','bar');
$this->config(['foo'=>'bar']);
$this->config(['foo'=>'bar']);