Default options.

@param string $attribute

@return string
342097
public function getInputType($attribute)
    {
        switch ($attribute) {
            case 'subtotal':
            case 'grand_total':
            case 'items_qty':
                return 'numeric';

            case 'method':
            case 'shipping_method':
            case 'country_id':
            case 'region_id':
            case 'customer_group_id':
                return 'select';

            default:
                $attribute = $this->configFactory->getAttribute(
                    'catalog_product',
                    $attribute
                );
                return $this->processAttribute($attribute);
        }
    }
126801
protected function passesOptionalCheck($attribute)
	{
		if ($this->hasRule($attribute, array('Sometimes')))
		{
			return array_key_exists($attribute, array_dot($this->data))
				|| in_array($attribute, array_keys($this->data))
				|| array_key_exists($attribute, $this->files);
		}

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

        return $attributes;
    }
1101598
public function findHeading(string $attribute, string $default = null): string
    {
        // In case attribute is used multiple times, grab last Field.
        $field = $this
            ->newResource()
            ->indexFields($this)
            ->where('attribute', $attribute)
            ->last();

        if (null === $field) {
            return $default;
        }

        return $field->name;
    }
218636
public function first($attribute=null) {
		if($attribute !== null)
			return $this->attribute($attribute)->first();
		else {
			if($this->rules)
				return array_values($this->rules)[0];
			elseif($this->attributes)
				return array_values($this->attributes)[0]->error();
		}
	}
934877
protected function passesOptionalCheck($attribute)
    {
        if (! $this->hasRule($attribute, array('Sometimes'))) {
            return true;
        }

        return array_key_exists($attribute, Arr::dot($this->data))
            || in_array($attribute, array_keys($this->data))
            || array_key_exists($attribute, $this->files);
    }
1229243
public function forgetAttribute($attribute)
    {
        if ($attribute === 'class') {
            $this->classes = [];

            return $this;
        }

        if (isset($this->attributes[$attribute])) {
            unset($this->attributes[$attribute]);
        }

        return $this;
    }
713851
public function makeAttributesForOption ($attributes)
    {
        $attrs = '';
        if ($attributes) {
            foreach ($attributes as $key => $value) {
                $attrs .= "$key='" . $value . "'";
            }
        }
        return $attrs;
    }
273202
public function getAttribute(string $attribute): string
    {
        if (!isset($this->attribute[$attribute])) {
            Throw new HtmlException(sprintf('The requested attribute "%s" does not exits in this html element "%s".', $attribute, get_called_class()));
        }

        return $this->attribute[$attribute];
    }
229011
protected function passesOptionalCheck($attribute)
    {
        if (! $this->hasRule($attribute, ['Sometimes'])) {
            return true;
        }

        $data = ValidationData::initializeAndGatherData($attribute, $this->data);

        return array_key_exists($attribute, $data)
            || array_key_exists($attribute, $this->data);
    }
483265
protected function getAttribute($attribute)
    {
        // The developer may dynamically specify the array of custom attributes
        // on this Validator instance. If the attribute exists in this array
        // it takes precedence over all other ways we can pull attributes.
        if (isset($this->customAttributes[$attribute])) {
            return $this->customAttributes[$attribute];
        }

        $key = "validation.attributes.{$attribute}";

        // We allow for the developer to specify language lines for each of the
        // attributes allowing for more displayable counterparts of each of
        // the attributes. This provides the ability for simple formats.
        if (! is_null($line = $this->config->get($key))) {
            return $line;
        }

        // If no language line has been specified for the attribute all of the
        // underscores are removed from the attribute name and that will be
        // used as default versions of the attribute's displayable names.
        return str_replace('_', ' ', Str::snake($attribute));
    }
725867
public function revert_attribute( $attribute ) {
		if ( array_key_exists( $attribute, $this->attributes ) ) {
			$this->attributes[ $attribute ] = $this->original[ $attribute ];
		}

		return $this;
	}
664440
public function attribute($attribute) {
		if(!is_array($attribute))
			$attribute = explode('.', $attribute);

		$next = array_shift($attribute);
		if(count($attribute) === 0) {
			if(!isset($this->attributes[$next]))
				return (new static(null))->setParent($this);
			else
				return $this->attributes[$next];
		}

		if($next === '<')
			return $this->parent()->attribute($attribute);
		else {
			if(!isset($this->attributes[$next]))
				return (new static(null))->setParent($this);
			else
				return $this->attributes[$next]->attribute($attribute);
		}
	}
190715
protected function takeAttributeFromDOM($attribute)
    {
        switch ($attribute->localName) {
            case 'url':
                $this->_url = $attribute->nodeValue;
                break;
            case 'fileSize':
                $this->_fileSize = $attribute->nodeValue;
                break;
            case 'type':
                $this->_type = $attribute->nodeValue;
                break;
            case 'medium':
                $this->_medium = $attribute->nodeValue;
                break;
            case 'isDefault':
                $this->_isDefault = $attribute->nodeValue;
                break;
            case 'expression':
                $this->_expression = $attribute->nodeValue;
                break;
            case 'bitrate':
                $this->_bitrate = $attribute->nodeValue;
                break;
            case 'framerate':
                $this->_framerate = $attribute->nodeValue;
                break;
            case 'samplingrate':
                $this->_samplingrate = $attribute->nodeValue;
                break;
            case 'channels':
                $this->_channels = $attribute->nodeValue;
                break;
            case 'duration':
                $this->_duration = $attribute->nodeValue;
                break;
            case 'height':
                $this->_height = $attribute->nodeValue;
                break;
            case 'width':
                $this->_width = $attribute->nodeValue;
                break;
            case 'lang':
                $this->_lang = $attribute->nodeValue;
                break;
            default:
                parent::takeAttributeFromDOM($attribute);
        }
    }
131820
public function getAttribute( $attribute ) {
		$data = $this->getData();

		return ! empty ( $data[$attribute] ) ? $data[$attribute] : '';
	}
964902
private function getAttributeId($attribute)
    {
        $attributeId = $attribute;

        if (is_object($attribute)) {
            $attributeId = $attribute->getAttributeId();
        }

        return $attributeId;
    }
49373
protected function getValue($attribute)
    {
        if (!is_null($value = array_get($this->data, $attribute))) {
            return $value;
        } elseif (!is_null($value = array_get($this->files, $attribute))) {
            return $value;
        }
    }