src/Charcoal/Source/AbstractSource.php
public function setData(array $data)
    {
        foreach ($data as $key => $val) {
            $setter = $this->setter($key);
            if (is_callable([ $this, $setter ])) {
                $this->{$setter}($val);
            } else {
                $this->{$key} = $val;
            }
        }

        return $this;
    }
public function setData(array $data)
    {
        foreach ($data as $key => $val) {
            $setter = $this->setter($key);
            if (is_callable([ $this, $setter ])) {
                $this->{$setter}($val);
            } else {
                $this->{$key} = $val;
            }
        }

        return $this;
    }
public function setData ( array $ data ) { foreach ( $ data as $ key => $ val ) { $ setter = $ this -> setter ( $ key ) ; if ( is_callable ( [ $ this , $ setter ] ) ) { $ this -> { $ setter } ( $ val ) ; } else { $ this -> { $ key } = $ val ; } } return $ this ; }
Set the source's settings.

@param  array $data Data to assign to the source.
@return self
Set the source s settings .