static public function setObjectProperties($object, array $config = [])
    {
        foreach (static::createSetterMethods($config) as $method => $value) {
            if (method_exists($object, $method)) {
                call_user_func_array([$object, $method], [$value]);
            }
        }
    }
static public function setObjectProperties($object, array $config = [])
    {
        foreach (static::createSetterMethods($config) as $method => $value) {
            if (method_exists($object, $method)) {
                call_user_func_array([$object, $method], [$value]);
            }
        }
    }
static public function setObjectProperties ( $ object , array $ config = [ ] ) { foreach ( static :: createSetterMethods ( $ config ) as $ method => $ value ) { if ( method_exists ( $ object , $ method ) ) { call_user_func_array ( [ $ object , $ method ] , [ $ value ] ) ; } } }
Sets object properties by a given array

@param $object
@param array $config
Sets object properties by a given array