@param string $attribute

@return array|null
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;
	}
552844
protected function validateAttribute (string $attribute=NULL) : bool
	{
		if (!property_exists($this, $attribute))
		{
			$this->error = "Attribute: ".ucfirst($attribute)." is not a class object.";
        	return FALSE;
		}
        $result = (is_array($this->$attribute)) ? !empty($this->$attribute) : Validate::hasValue($this->$attribute);
        if ($result) return TRUE;
		$this->error = "Set ".ucfirst($attribute)." to log your message.";
    	return FALSE;
	}
1096863
public function guessColumnForQuery( $attribute )
	{
		if ( in_array( $attribute, array_collapse( $this->implicitAttributes ) ) && !is_numeric( $last = last( explode( '.', $attribute ) ) ) )
		{
			return $last;
		}

		return $attribute;
	}
556991
public function getAttribute($attribute)
    {
        switch ($attribute) {
            case self::PROPEL_ATTR_CACHE_PREPARES:
                return $this->isCachePreparedStatements;
                break;
            default:
                return $this->connection->getAttribute($attribute);
        }
    }
946232
public function getUploadedFileUrl($attribute)
    {
        if (!$this->owner->{$attribute}) {
            return null;
        }

        $behavior = static::getInstance($this->owner, $attribute);

        return $behavior->resolvePath($behavior->fileUrl);
    }
1224578
protected function getDateAttribute($attribute)
        {
            switch ($attribute) {
                case 'Day':
                    return $this->format('d');
                    break;
                case 'Month':
                    return $this->format('m');
                    break;
                case 'Year':
                    return $this->format('Y');
                    break;
                case 'Hour':
                    return $this->format('G');
                    break;
                case 'Minute':
                    return $this->format('i');
                    break;
                case 'Second':
                    return $this->format('s');
                    break;
                case 'DayOfWeek':
                    return $this->format('l');
                    break;
                case 'DayOfWeekAsNumeric':
                    return $this->format('w');
                    break;
                case 'DaysInMonth':
                    return $this->format('t');
                    break;
                case 'DayOfYear':
                    return $this->format('z');
                    break;
                case 'DaySuffix':
                    return $this->format('S');
                    break;
                case 'LeapYear':
                    return (bool) $this->format('L');
                    break;
                case 'AmOrPm':
                    return $this->format('A');
                    break;
                case 'DaylightSavings':
                    return (bool) $this->format('I');
                    break;
                case 'GmtDifference':
                    return $this->format('O');
                    break;
                case 'SecondsSinceEpoch':
                    return $this->format('U');
                    break;
                case 'TimezoneName':
                    return $this->getTimezone()->getName();
                    break;
            }

            throw new \InvalidArgumentException('The date attribute [' . $attribute . '] could not be found.');
        }
240724
public function attr($attribute)
    {
        if (!$this->attributes instanceof EntityAttributeContainer) {
            $this->attributes = $this->createEntityAttributeContainer();
        }

        return $this->attributes->attr($attribute);
    }
1162880
protected function extractDistinctValues($attribute)
    {
        $attributeData = ValidationData::extractDataFromPath(
            ValidationData::getLeadingExplicitAttributePath($attribute), $this->data
        );

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

        return Arr::where(Arr::dot($attributeData), function ($value, $key) use ($pattern) {
            return (bool) preg_match('#^'.$pattern.'\z#u', $key);
        });
    }
957193
protected static function firstByAttributes($attributes)
	{
		$query = static::query();

		foreach ($attributes as $key => $value)
		{
			$query->where($key, $value);
		}

		return $query->first() ?: null;
	}
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;
        }
    }
571960
public function getInfo($attribute = null)
    {
        if (!isset($this->sourceAttributes)) {
            $this->sourceAttributes = $this->getSourceAttributes();
        }

        if (!is_null($attribute)) {
            return isset($this->sourceAttributes[$attribute]) ? $this->sourceAttributes[$attribute] : null;
        }

        return $this->sourceAttributes;
    }
56196
public function getNormalizedScoresByAttribute(Attribute $attribute): Collection
    {
        $scores = $this->getScoresByAttribute($attribute);

        $max = $scores->max();

        return $scores->map(function ($score) use ($max) {
            return is_null($score) ? null : ($score / $max);
        });
    }
964902
private function getAttributeId($attribute)
    {
        $attributeId = $attribute;

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

        return $attributeId;
    }
1198273
public function getAttribute($attribute)
    {
        switch ($attribute) {
            case self::ATTR_PERSISTENT:
                return false;

            case self::ATTR_PREFETCH:
                return false;

            case self::ATTR_CLIENT_VERSION:
                return self::VERSION;

            case self::ATTR_SERVER_VERSION:
                return $this->server->getServerVersion();

            case self::ATTR_SERVER_INFO:
                return $this->server->getServerInfo();

            case self::ATTR_TIMEOUT:
                return $this->attributes['timeout'];

            case self::CRATE_ATTR_HTTP_BASIC_AUTH:
                return $this->attributes['auth'];

            case self::ATTR_DEFAULT_FETCH_MODE:
                return $this->attributes['defaultFetchMode'];

            case self::ATTR_ERRMODE:
                return $this->attributes['errorMode'];

            case self::ATTR_DRIVER_NAME:
                return static::DRIVER_NAME;

            case self::ATTR_STATEMENT_CLASS:
                return [$this->attributes['statementClass']];

            case self::CRATE_ATTR_DEFAULT_SCHEMA:
                return $this->attributes['defaultSchema'];

            case self::CRATE_ATTR_SSL_MODE:
                return $this->attributes['sslMode'];

            case self::CRATE_ATTR_SSL_CA_PATH:
                return $this->attributes['sslCa'] ?? null;

            case self::CRATE_ATTR_SSL_CA_PASSWORD:
                return $this->attributes['sslCaPassword'] ?? null;

            case self::CRATE_ATTR_SSL_CERT_PATH:
                return $this->attributes['sslCert'] ?? null;

            case self::CRATE_ATTR_SSL_CERT_PASSWORD:
                return $this->attributes['sslCertPassword'] ?? null;

            case self::CRATE_ATTR_SSL_KEY_PATH:
                return $this->attributes['sslKey'] ?? null;

            case self::CRATE_ATTR_SSL_KEY_PASSWORD:
                return $this->attributes['sslKeyPassword'] ?? null;

            default:
                // PHP Switch is a lose comparison
                if ($attribute === self::ATTR_AUTOCOMMIT) {
                    return true;
                }

                throw new Exception\PDOException(sprintf('Unsupported driver attribute: %s', $attribute));
        }
    }
305511
public function getAttribute($attribute, $default = NULL) {

		if (!$this->attributes || !array_key_exists(strtolower($attribute), $this->attributes)) {
			return $default;
		}
		return $this->attributes[strtolower($attribute)];
	
	}
55761
protected function getDistinctValues($attribute)
    {
        $attributeName = $this->getPrimaryAttribute($attribute);

        if (! property_exists($this, 'distinctValues')) {
            return $this->extractDistinctValues($attributeName);
        }

        if (! array_key_exists($attributeName, $this->distinctValues)) {
            $this->distinctValues[$attributeName] = $this->extractDistinctValues($attributeName);
        }

        return $this->distinctValues[$attributeName];
    }
352617
protected function replaceAttribute($attribute)
	{
		if (array_key_exists($attribute, $this->replacements)) {
			return $this->replacements[$attribute];
		}

		return $attribute;
	}