Returns the list of attribute names.
By default, this method returns all attributes mentioned in rules.
You may override this method to change the default behavior.
@return string[] list of attribute names
325301
public function attributes()
    {
        $attributes = [];
        foreach ($this->rules() as $rule) {
            $names = reset($rule);
            if (is_string($names)) {
                $names = [$names];
            }
            foreach ($names as $name) {
                if (substr_compare($name, '!', 0, 1) === 0) {
                    $name = mb_substr($name, 1);
                }
                $attributes[$name] = $name;
            }
        }

        return array_values($attributes);
    }
1193975
public function getAttributes()
    {
        $return = [];
        foreach ($this->attr as $attr => $info) {
            $return[$attr] = $this->getAttribute($attr);
        }

        return $return;
    }
1137663
final public function attributes () : array
	{
		$attributes = [];
		foreach (static::$databaseFields as $field):
			if (isset($this->$field))
				$attributes[$field] = $this->$field;
		endforeach;
		return $attributes;
	}
708725
public function info()
    {
        $data = [];
        foreach ($this->attributes as $key => $value) {
            switch (gettype($value)) {
                case 'boolean':
                    $data[$key] = [
                        'boolValue' => $value
                    ];
                    break;
                case 'integer':
                    $data[$key] = [
                        'intValue' => $value
                    ];
                    break;
                default:
                    $data[$key] = [
                        'stringValue' => ['value' => (string) $value]
                    ];
            }
        }
        return [
            'attributeMap' => $data
        ];
    }
795482
public Enumeration getAttributeNames() {
        Enumeration attrNameEnum;
        if (!_hasSecurityInfo) {
            attrNameEnum = super.getAttributeNames();
        } else {
            String[] attrNames = getValueNames();
            attrNameEnum = new ArrayEnumeration(attrNames);
        }
        return attrNameEnum;
    }
510862
@SuppressWarnings("unchecked")
    public String[] getAttributeNames() {

        List<String> names = new ArrayList<String>();
        Enumeration<String> keys = attributes.keys();
        while (keys.hasMoreElements()) {
            names.add((String) keys.nextElement());
        }
        String results[] = new String[names.size()];
        for (int i = 0; i < results.length; i++) {
            results[i] = (String) names.get(i);
        }
        return (results);

    }
796887
public function getAttributes(): array
    {
        $attributes = [];
        if (null !== $this->from) {
            $attributes['from'] = $this->from->getTimestamp();
        }
        return $attributes;
    }
135508
public function getAttributes()
    {
        $array = [];

        if ($this->getValueSet() === null) {
            return $array;
        }

        foreach ($this->getValueSet()->getValues() as $value) {
            $array[$value->getAttribute()->getName()] = $value;
        }

        return $array;
    }
1075111
public function attributes()
    {
        $class = new \ReflectionClass($this);

        $names = [];
        foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) {
            if (!$property->isStatic()) {
                $names[] = $property->getName();
            }
        }

        return ArrayHelper::merge(parent::attributes(), $names);
    }
282790
public function getAttributes(): array
    {
        $search = array_column($this->map, 'attr');
        $result = ldap_read($this->ldap->getResource(), $this->ldap_dn, '(objectClass=*)', $search);
        $entries = ldap_get_entries($this->ldap->getResource(), $result);
        $attributes = $entries[0];

        $this->logger->info("get ldap user [{$this->ldap_dn}] attributes", [
            'category' => get_class($this),
            'params' => $attributes,
        ]);

        return $attributes;
    }
91149
public function getDefaultValues()
    {
        $result = [];

        foreach ($this->getFormFields() as $attribute => $field) {
            if (($value = array_get($field, 'default')) === null) {
                continue;
            }

            $result[$attribute] = $value;
        }

        return $result;
    }
1002719
public function getAttributes()
    {
        $attributes = array_merge(
            parent::getAttributes(),
            [
                'data-depth' => $this->Depth,
                'data-zoom' => $this->Zoom,
                'data-zoom-min' => $this->ZoomMin,
                'data-zoom-max' => $this->ZoomMax,
                'data-canvas' => $this->CanvasCSSID,
                'data-tag-list' => $this->TagListID,
                'data-color-text' => $this->ColorText,
                'data-color-outline' => $this->ColorOutline,
                'data-weight-size-min' => $this->WeightSizeMin,
                'data-weight-size-max' => $this->WeightSizeMax,
                'data-initial' => $this->Initial,
                'data-weight' => $this->dbObject('Weight')->NiceAsBoolean()
            ]
        );
        
        return $attributes;
    }
893285
public function getAttributes()
    {
        $ret = array();

        if (count($this->attributes)) {
            foreach ($this->attributes as $name => $value) {
                $ret[] = sprintf($name . '="%s"', $value);
            }
        }

        if (count($this->varAttr)) {
            foreach ($this->varAttr as $name => $value) {
                $ret[] = sprintf($name . '="%s"', $value);
            }
        }

        if (strlen($className = $this->getClassName())) {
            $ret[] = sprintf('class="%s"', $className);
        }
        return ' ' . implode(' ', $ret);
    }
406859
public function getAttributeLabels()
    {
        $labels = [];
        foreach ($this->getAttributes() as $attribute => $value) {
            $labels[$attribute] = $this->getAttributeLabel($attribute);
        }
        return $labels;
    }
673358
public function attributes()
    {
        return [
            $this->attributePrefix.'address' => (int) $this->address,
            $this->attributePrefix.'title'   => (int) $this->title,
        ];
    }
158085
public function getAttributes()
    {
        $attributes = $this->attributes ? $this->attributes : [];

        array_forget($attributes, ['active', 'icon']);

        return HTML::attributes($attributes);
    }
314107
public Collection<String> listAttributeNames() {
        List<String> list = new ArrayList<String>();
        try {
            MBeanAttributeInfo[] attrs = beanInfo.getAttributes();
            for (MBeanAttributeInfo attr : attrs) {
                list.add(attr.getName());
            }
        } catch (Exception e) {
            throwException("Could not list attribute names. Reason: ", e);
        }
        return list;
    }