Returns an associative array containing values for all the attributes in $attributes

@param array $attributes Array containing attribute names
@return array A hash containing $name => $value
495107
public function getValuesFor($attributes)
	{
		$ret = array();
		foreach ($attributes as $name) {
			if (array_key_exists($name, $this->_attributes)) {
				$ret[$name] = $this->_attributes[$name];
			}
		}
		return $ret;
	}
247458
protected function prepareAttributes(array $attributes)
    {
        $attributes['data-sitekey'] = $this->sitekey;
        if (!isset($attributes['class'])) {
            $attributes['class'] = '';
        }
        $attributes['class'] = trim('g-recaptcha ' . $attributes['class']);

        return $attributes;
    }
947819
public function attributes($attributes = null)
    {
        if (null === $attributes) {
            return $this->attributes;
        }

        $this->attributes = $attributes;

        return $this;
    }
688106
public function setAttributes($attributes)
    {
        if (! is_array($attributes)) {
            $attributes = [$attributes];
        }

        $this->attributes = $attributes;

        return $this;
    }
6947
protected function callClosureAttributes(array $attributes)
    {
        foreach ($attributes as &$attribute) {
            $attribute = $attribute instanceof Closure
                ? $attribute($attributes) : $attribute;
        }

        return $attributes;
    }
848274
public function withAttributes(array $attributes)
    {
        $clone = clone $this;

        foreach ($attributes as $name => $value) {
            $clone->dom->documentElement->setAttribute($name, $value);
        }

        return $clone;
    }
808315
private function fill(array $attributes)
    {
        $name = array_filter(explode(' ', $attributes['name']));
        $name = array_shift($name);

        $bindValueName = $name;
        if (substr($name, -1) === '.') {
            $bindValueName = substr($bindValueName, 0, -1);
        }

        $attributes['value'] = $this->getValue($bindValueName, $attributes['value'] ?? null);

        $binding = explode('.', $name);

        $attributes['name'] = '';
        foreach ($binding as $key => $bind) {
            if (! is_null($attributes['prefix'])) {
                $attributes['name'] .= '['.$bind.']';
                continue;
            }

            if ($key === 0) {
                $attributes['name'] .= $bind;
                continue;
            }

            $attributes['name'] .= '['.$bind.']';
        }

        return $attributes;
    }
1025413
protected function parseAttributes(array $attributes)
	{
		if (isset($attributes['class'])) {
			if (is_string($attributes['class'])) {
				$attributes['class'] = explode(' ', $attributes['class']);
			}
		} else {
			$attributes['class'] = [];
		}

		return $attributes;
	}
482896
public function row(array $attributes = array())
        {
            $row = new self();

            if (count($attributes)) {
                $row->setAttributes($attributes);
            }

            return $row;
        }
1323195
public function toArray($attributes = null)
    {
        $result = null;

        $excluded_attributes = self::$_manager->getExcludedAttributes($this);

        if (is_null($attributes)) {
            $result = get_object_vars($this);
        } else {
            $result = array_intersect_key(get_object_vars($this), $attributes);
        }        

        foreach ($excluded_attributes as $excluded_attribute) { 
            unset($result[$excluded_attribute]);
        }

        if (in_array('_last', $result)) {
            unset($result['_last']);
        }
        
        foreach ($result as $key => $value) { 
            if (empty($value)) { 
                unset($result[$key]);
            }
        }

        return $result;
    
    }
867560
protected function fillableFromArray(array $attributes)
    {
        if (count($this->fillable) > 0 && ! static::$unguarded) {
            return array_intersect_key($attributes, array_flip($this->fillable));
        }

        return $attributes;
    }
48571
protected function filterAttributeValues(array $attributes)
    {
        return array_filter($attributes, function ($value) {
            if (is_array($value) && empty($value)) {
                return false;
            }

            return !($value === '' || $value === null);
        });
    }
513919
public function create(array $attributes = [])
    {
        $results = $this->make($attributes);

        $this->getMapper()->store($results);

        return $results;
    }
647021
public function datagridAttributes(array $attributes)
    {
        $result = '';

        foreach ($attributes as $attributeName => $attributeValue) {
            $result .= ' '.$attributeName.'="'.$attributeValue.'"';
        }

        return $result;
    }
69728
public static function sanitizeAttributeArray(array $attributes)
    {
        foreach ($attributes as $name => $values) {
            if (in_array(strtolower($name), self::MASK_ATTRIBUTES)) {
                $attributes[$name] = self::MASK_PASSWORD;
            } else {
                $replaced = false;
                $newValues = is_array($values) ? $values : [$values];
                foreach ($newValues as $i => $v) {
                    if (is_string($v) && self::isBinary($v)) {
                        $newValues[$i] = LdapUtilities::MASK_BINARY;
                        $replaced = true;
                    }
                }
                if ($replaced) {
                    $attributes[$name] = is_array($values) ? $newValues : reset($newValues);
                }
            }
        }

        return $attributes;
    }
1172089
private function getHTMLAttributes($attributes)
    {
        $attr = '';
        foreach($attributes as $key => $value) {
            $attr .= $key.'="'.$value.'" ';
        }
        return $attr;
    }
963698
protected static function prepareAttributes($attributes)
    {
        $prepared = array();
        if (is_string($attributes)) {
            return self::parseAttributes($attributes);

        } elseif (is_array($attributes)) {
            foreach ($attributes as $key => $value) {
                if (is_int($key)) {
                    $key = strtolower($value);
                    $prepared[$key] = $key;
                } else {
                    $prepared[strtolower($key)] = (string)$value;
                }
            }
        }
        return $prepared;
    }