protected function assignFromArray($data)
    {
        if (!is_array($data)) {
            throw new \InvalidArgumentException(
                "Invalid data type: argument should be array, '" .gettype($name) . "' given."
            );
        }

        foreach ($data as $key => $value) {
            $this->assign($key, $value);
        }
    }