Retrieves group members by the specified model attribute.

@param $attribute

@return array
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;
    }
460056
public function collectData($attributes = null)
    {
        $data = [];
        foreach ($this->models as $model) {
            if ($this->dataCollector instanceof Closure) {
                list($key, $row) = call_user_func($this->dataCollector, $model, $this);
            } else {
                $key = $model->getPrimaryKey();
                $row = $model->getAttributes($attributes);
            }

            if ($key) {
                $data[$key] = $row;
            } else {
                $data[] = $row;
            }
        }

        return $data;
    }
44588
protected function _getIdempotencyAttributes($attributes)
    {
        $result = [];
        foreach ($attributes as $key => $value) {
            if ($value['idempotency']) {
                $result[] = $key;
            }
        }
        return implode('&', $result);
    }
263999
protected function get($attribute)
    {
        if (!$value = $this->attributes->get($attribute, null, false)) {
            throw new \OutOfBoundsException('no attribute with name "' . $attribute . '" set');
        }

        return $value;
    }
802661
public function getAttribute($attribute) {
		if (isset($this->_attributes[$attribute])) {
			return $this->_attributes[$attribute];
		}

		return null;
	}
976152
public function getGetterCodeDocumentationLines(JavaAttribute $attribute)
    {
        $lines = [];

        $lines[] = 'Get ' . $attribute->getLowerFullName();
        $lines[] = '';
        $lines[] = '@return ' . ('object' === $attribute->getType() ? $attribute->getEntitySubtype()->getName() : $attribute->getType());

        return $lines;
    }
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);
        });
    }
248301
public function getAttributeToLdap($attribute)
    {
        return $this->hasAttribute($attribute) ? $this->lcAttributeNameMap[strtolower($attribute)] : $attribute;
    }
1298639
public function getAttributeDocumentationLinesBasePart(JavaAttribute $attribute)
    {
        $lines = [];

        if (null !== $attribute->getDescription()) {
            $lines[] = $attribute->getDescription();
            $lines[] = '';
        }

        $lines[] = '@var ' . $attribute->getType() . ' ' . $attribute->getLowerFullName();

        return $lines;
    }
297999
public function getAttribute($attribute)
    {
        if (! isset($this->attributes[$attribute])) {
            throw new \Exception('Attribute "'.$attribute.'" is not set');
        }
        $this->attributes[$attribute];
    }
1179020
protected function getRule($attribute, $rules)
    {
        if (! array_key_exists($attribute, $this->rules)) {
            return;
        }

        $rules = (array) $rules;

        foreach ($this->rules[$attribute] as $rule) {
            [$rule, $parameters] = ValidationRuleParser::parse($rule);

            if (in_array($rule, $rules)) {
                return [$rule, $parameters];
            }
        }
    }
1126090
public function getAttribute($attribute)
    {
        $ret = '';
        if (isset($this->attributeHash[$attribute])) {
            $ret = $this->attributeHash[$attribute];
        }

        return $ret;
    }
1287819
public function getGetterDeclarationLines(CPPAttribute $attribute)
    {
        $lines = [];

        if ('object' === $attribute->getType()) {
            $lines[] = $attribute->getStatic()
                ? $attribute->getEntitySubtype()->getName() . ' ' . $attribute->getGetterName() . '();'
                : $attribute->getEntitySubtype()->getName() . ' ' . $attribute->getGetterName() . '();';
        } else {
            $lines[] = $attribute->getStatic()
                ? $attribute->getType() . ' ' . $attribute->getGetterName() . '();'
                : $attribute->getType() . ' ' . $attribute->getGetterName() . '();';
        }

        return $lines;
    }
1218781
public function fileState($attribute)
    {
        $state = Yii::$app->session->get(Yii::$app->fileManager->sessionName);
        return ArrayHelper::getValue($state === null ? [] : $state, $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];
    }
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;
    }
717293
public function getAttribute($attribute)
    {
        switch ($attribute) {
            case \PDO::ATTR_AUTOCOMMIT:
                return true;
            case \PDO::ATTR_CASE:
            case \PDO::ATTR_CLIENT_VERSION:
            case \PDO::ATTR_CONNECTION_STATUS:
                return $this->client->connected;
            case \PDO::ATTR_DRIVER_NAME:
            case \PDO::ATTR_ERRMODE:
                return 'Swoole Style';
            case \PDO::ATTR_ORACLE_NULLS:
            case \PDO::ATTR_PERSISTENT:
            case \PDO::ATTR_PREFETCH:
            case \PDO::ATTR_SERVER_INFO:
                return self::$options['timeout'];
            case \PDO::ATTR_SERVER_VERSION:
                return 'Swoole Mysql';
            case \PDO::ATTR_TIMEOUT:
            default:
                throw new \InvalidArgumentException('Not implemented yet!');
        }
    }