private function attributesToXml() {
        $attributes = array();

        foreach (self::$properties[get_class($this)] as $name => $info) {
            if(!$info['attribute']) {
                continue;
            }

            if (!array_key_exists($name, $this->values)) {
                continue;
            }

            $attributes[] = self::attributeToXml($info['attributeName'], $this->values[$name]);
        }

        return join('', $attributes);
    }