Retrieve a database connection attribute.

@param string $attribute The name of the attribute to retrieve,
e.g. PDO::ATTR_AUTOCOMMIT

@return mixed A successful call returns the value of the requested attribute.
An unsuccessful call returns null.
556991
public function getAttribute($attribute)
    {
        switch ($attribute) {
            case self::PROPEL_ATTR_CACHE_PREPARES:
                return $this->isCachePreparedStatements;
                break;
            default:
                return $this->connection->getAttribute($attribute);
        }
    }
478445
public function get_attribute( $key ) {
		if ( 'id' === $key ) {
			return $this->get_id();
		}

		// Return a "null" if not found attribute.
		if ( ! array_key_exists( $key, $this->attributes ) ) {
			return;
		}

		// The value should be returned.
		$value = $this->attributes[ $key ];

		// Cast to native PHP type and return if has case.
		if ( $this->has_cast( $key ) ) {
			return $this->cast_attribute( $key, $value );
		}

		return $value;
	}
391490
public function getFirstError($attribute = null)
    {
        if (empty($this->errors)) {
            return null;
        }
        if (isset($attribute)) {
            if (isset($this->errors[$attribute])) {
                return current($this->errors[$attribute]);
            }
            return null;
        }
        $error = current($this->errors);
        if (is_array($error)) {
            return current($error);
        }
        return $error;
    }
181084
protected function getMembersFromAttribute($attribute)
    {
        $members = [];

        $entries = $this->getAttribute($attribute) ?: [];

        $query = $this->query->newInstance();

        // Retrieving the member identifier to allow
        // compatibility with LDAP variants.
        $identifier = $this->schema->memberIdentifier();

        foreach ($entries as $entry) {
            // If our identifier is a distinguished name, then we need to
            // use an alternate query method, as we can't locate records
            // by distinguished names using an LDAP filter.
            if ($identifier == 'dn' || $identifier == 'distinguishedname') {
                $member = $query->findByDn($entry);
            } else {
                // We'll ensure we clear our filters when retrieving each member,
                // so we can continue fetching the next one in line.
                $member = $query->clearFilters()->findBy($identifier, $entry);
            }

            // We'll double check that we've received a model from
            // our query before adding it into our results.
            if ($member instanceof Model) {
                $members[] = $member;
            }
        }

        return $members;
    }
1057376
public function getAttribute($key)
    {
        try {
            return $this->_stmt->getAttribute($key);
        } catch (PDOException $e) {
            // require_once 'Zend/Db/Statement/Exception.php';
            throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
        }
    }
1302579
protected function getCustomCastObject($attribute)
    {
        // Check if custom cast object already been set
        if (isset($this->customCastObjects[$attribute])) {
            return $this->customCastObjects[$attribute];
        }

        $customCastClass = $this->casts[$attribute];
        $customCastObject = new $customCastClass($this, $attribute);

        return $this->customCastObjects[$attribute] = $customCastObject;
    }
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;
    }
479229
protected function getAttribute(String $attribute)
	{
		if (!is_object($this->column)) {
			return null;
		}

		if (is_object($this->column) && isset($this->column->$attribute)) {
			return $this->column->$attribute;
		}

		if (is_array($this->column) && isset($this->column[$attribute])) {
			return $this->column[$attribute];
		}
	}
663301
public function getAttribute( $key ){
		if( !array_key_exists( $key, $this->attributes ) )
			return NULL;
		return $this->attributes[$key];
	}
898663
public function translate($attribute)
    {
        $translationCode = $this->translationCodeFor($attribute);
        $translation     = $translationCode ? trans($translationCode) : false;
        return $translation ?: parent::getAttribute($attribute);
    }
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);
		}
	}
324616
public function getTableAttribute($attribute)
    {
        if (! array_key_exists($attribute, $this->tableAttributes)) {
            throw new \Exception("Table attribute '{$attribute}' does not exist.");
        }

        return $this->tableAttributes[$attribute];
    }
629505
public function getAttribute($attribute)
    {
        if (isset($this->options[$attribute])) {
            return $this->options[$attribute];
        }
        return null;
    }
368318
public function guessColumnForQuery($attribute)
    {
        if (in_array($attribute, Arr::collapse($this->implicitAttributes))
                && ! is_numeric($last = last(explode('.', $attribute)))) {
            return $last;
        }

        return $attribute;
    }
909525
public function getLocaled(string $attribute)
    {
        // if always decoded
        if (Any::isArray($this->{$attribute})) {
            return $this->{$attribute}[App::$Request->getLanguage()];
        }

        if (!Any::isStr($attribute) || Str::likeEmpty($this->{$attribute})) {
            return null;
        }

        return Serialize::getDecodeLocale($this->{$attribute});
    }
632411
public function getDbAttribute($attribute, $default = null)
    {
        return isset($this->_dbAttributes[$attribute]) ? $this->_dbAttributes[$attribute] : $default;
    }
1053139
public function getFirstError($attribute)
    {
        $errors = $this->getErrors();
        return isset($errors[$attribute]) ? reset($errors[$attribute]) : null;
    }