Get all of the exact attribute values for a given wildcard attribute.

@param  array $data
@param  string $attribute
@return array
176105
public function extractValuesForWildcards( $data, $attribute )
	{
		$keys = [];

		$pattern = str_replace( '\*', '[^\.]+', preg_quote( $attribute ) );

		foreach ( $data as $key => $value )
		{
			if ( (bool) preg_match( '/^' . $pattern . '/', $key, $matches ) )
			{
				$keys[] = $matches[0];
			}
		}

		$keys = array_unique( $keys );

		$data = [];

		foreach ( $keys as $key )
		{
			$data[$key] = array_get( $this->data, $key );
		}

		return $data;
	}
1304880
public function attr($attribute)
    {
        $node = $this->getNode();
        $value = null;

        if ($node instanceof \DOMNode) {
            $value = $node->getAttribute($attribute);
        } else {
            foreach ($node as $item) {
                if ($item->hasAttribute($attribute)) {
                    $value = $node->attr($attribute);
                }

                break;
            }
        }

        return $value;
    }
61218
public function raw(array $attributes = [])
    {
        if ($this->amount === null) {
            return $this->getRawAttributes($attributes);
        }

        if ($this->amount < 1) {
            return [];
        }

        return array_map(function () use ($attributes) {
            return $this->getRawAttributes($attributes);
        }, range(1, $this->amount));
    }
1087497
public function each( $attribute, $rules )
	{
		$data = Arr::dot( $this->initializeAttributeOnData( $attribute ) );

		$pattern = str_replace( '\*', '[^\.]+', preg_quote( $attribute ) );

		$data = array_merge( $data, $this->extractValuesForWildcards( $data, $attribute ) );

		foreach ( $data as $key => $value )
		{
			if ( Str::startsWith( $key, $attribute ) || (bool) preg_match( '/^' . $pattern . '\z/', $key ) )
			{
				foreach ( (array) $rules as $ruleKey => $ruleValue )
				{
					if ( !is_string( $ruleKey ) || Str::endsWith( $key, $ruleKey ) )
					{
						$this->implicitAttributes[$attribute][] = $key;

						$this->mergeRules( $key, $ruleValue );
					}
				}
			}
		}
	}
1208750
private function setArrayAndCheckNull(array $data, $object, $attribute): array
    {
        $value = $this->setArray($object);

        if ($this->checkNullForAttribute($value, $attribute) === false) {
            $data[$attribute] = $value;
        }

        return $data;
    }
473538
public function allLanguageValues($values, $attribute = null)
    {
        $model = new $this->owner->modelClass();

        return $this->anyLanguageValues($values, $attribute)->andHaving(new Expression('COUNT(*) = ' . count($model->filterLanguageValues($values))));
    }
780608
public function matchSingleResult(array $attributes) : array
    {
        return $this->asArray ? $this->matchAsArray($attributes) : $this->matchAsAttributes($attributes);
    }
5733
protected function getPrimaryAttribute($attribute)
    {
        foreach ($this->implicitAttributes as $unparsed => $parsed) {
            if (in_array($attribute, $parsed)) {
                return $unparsed;
            }
        }

        return $attribute;
    }
693955
static function htmlAttributes(array $attributes = array()) {
    foreach ($attributes as $attribute => &$data) {
      $data = implode(' ', (array) $data);
      $data = $attribute . '="' . self::checkPlain($data) . '"';
    }
    return $attributes ? ' ' . implode(' ', $attributes) : '';
  }
183794
public static function allAttributesFrom(string $attribute) {
		$modules = self::all();
		$result = [];
		foreach ($modules as $module) {
			if ($module->$attribute) {
				$attr = $module->$attribute;
				
				if (is_array($attr)) {
					foreach ($attr as $item) {
						$result[] = $item;
					}
				}
				else {
					$result[] = $attr;
				}
			}
		}
		
		return empty($result) ? null : $result;
	}
1241440
protected function getAttributeContext(
        DataInterface $object,
        $attribute,
        /* @noinspection PhpUnusedParameterInspection */
        $rawValue,
        array $context
    ) {
        $resolvedContext = parent::getAttributeContext($object, $attribute, $rawValue, $context);

        if (!\is_object($rawValue)) {
            return $resolvedContext;
        }

        $resolvedContext['resource_class'] = ClassUtils::getClass($rawValue);
        unset($resolvedContext['item_operation_name'], $resolvedContext['collection_operation_name']);

        return $resolvedContext;
    }
825063
protected function buildAttributeConditions($attribute)
    {
        $attributes = [];
        foreach (array_merge([''], static::$filterConditions) as $condition) {
            $attributes[] = $attribute . ($condition === '' ? '' : "_$condition");
        }

        return $attributes;
    }
281101
public function getSingleAdderCodeDocumentationParameterLines(PHPAttribute $attribute)
    {
        $lines = [];

        $lines[] = '@param ' . $attribute->getPhpSingleTypeBase() . ' $' . $attribute->getSingleName();
        $lines[] = '@param bool $_allowRepeatedValues';

        return $lines;
    }
248301
public function getAttributeToLdap($attribute)
    {
        return $this->hasAttribute($attribute) ? $this->lcAttributeNameMap[strtolower($attribute)] : $attribute;
    }
356228
public function getAttribute(string $attribute): array
    {
        // Determine if the attribute is present
        if (! array_key_exists($attribute, $this->attributes)) {
            return [];
        }

        // Return the value of the attribute
        return $this->attributes[$attribute];
    }
1368745
public function findAllBy($attribute, $value, $columns = ['*'])
    {
        return $this->postProcess( parent::findAllBy($attribute, $value, $columns) );
    }
165528
public function getValuesLen($entry, $attribute)
    {
        if ($this->suppressErrors) {
            return @ldap_get_values_len($this->getConnection(), $entry, $attribute);
        }

        return ldap_get_values_len($this->getConnection(), $entry, $attribute);
    }