protected function setVisibleAttribute(string $name, $value)
    {
        $method = "set" . ucfirst($name);
        if (method_exists($this, $method)) {
            $value = $this->$method($value);

        } elseif (PublicReflection::hasAttribute(get_class($this), $name)) {
            $value = $this->setAttribute($name, $value);

        } elseif ($this->triggerUndefinedAttributeNotice) {
            $className = get_class($this);
            trigger_error("The property {$className}::\${$name} is not accessible.", E_USER_NOTICE);
        }
        return $value;
    }