Xpressengine\Config\ConfigEntity::set PHP Method

set() public method

set entity value
public set ( string $name, mixed $value ) : void
$name string variable name
$value mixed variable value
return void
    public function set($name, $value)
    {
        if ($value === null) {
            unset($this->vo->{$name});
        } else {
            $this->vo->{$name} = Caster::cast($value);
        }
    }

Usage Example

 public function set(array $data)
 {
     $this->config = $this->cfg->set($this->key, $data);
     if (!$this->config->get('uuid')) {
         $this->config->set('uuid', $this->keygen->generate());
         $this->cfg->modify($this->config);
     }
 }
All Usage Examples Of Xpressengine\Config\ConfigEntity::set