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

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

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

@param array $data The data to set.
@return Email Chainable
Set the email s data .