Returns specific aggregation by name.

@param string $name

@return array
775425
public function getAggregation($name)
    {
        if (isset($this->aggregations[$name])) {
            return $this->aggregations[$name];
        }
        return null;
    }
1368882
public function getItemData($name): array
    {
        if (func_num_args() > 1)
            $name = func_get_args();

        if (!$this->hasItemData($name))
            return $this->getItemDataNotFound($name);

        return $this->getData()[$this->getItemKey($name)];
    }
357076
protected static function getAlgorithm($name)
    {
        if (!isset(self::$algorithms[$name])) {
            self::$algorithms[$name] = new $name();
        }

        return self::$algorithms[$name];
    }
688966
public function get($name)
    {
        return isset($this->collection[$name]) ? $this->collection[$name] : null;
    }
1167466
public function get($name)
    {
        $name = $this->normalizeName($name);
        $data = [];
        if (isset($this->data[$name])) {
            $data = $this->data[$name];
        }

        return $data;
    }
326732
public function allOf(string $name): array
    {
        $oid = AttributeType::attrNameToOID($name);
        $attrs = array_filter($this->_attributes,
            function (Attribute $attr) use ($oid) {
                return $attr->oid() == $oid;
            });
        return array_values($attrs);
    }
320513
public static function getISOByName($name)
    {
        $data = collect(self::ISOlist());
        return $data->where('name', $name)->first();
    }
576050
public function getGroupByName($name)
    {
        return $this->getGroups()->then(function (array $groups) use ($name) {
            foreach ($groups as $group) {
                if ($group->getName() === $name) {
                    return $group;
                }
            }

            throw new ApiException('Group ' . $name . ' not found.');
        });
    }
950682
public function getByName($name)
    {
        return isset($this->names[$name]) ? $this->names[$name] : null;
    }
160401
public function getColumn($name)
    {
        $columns = array_filter(
            $this->getColumns(),
            function ($column) use ($name) {
                return $column->getName() === $name;
            }
        );

        return array_pop($columns);
    }
122252
public function getVocabularyByNameAsArray($name) {
    $vocabulary = $this->vocabulary->where('name', $name)->first();

    if (!is_null($vocabulary)) {
      return $vocabulary->terms->pluck('name', 'id')->toArray();
    }

    return [];
  }
272936
public function getCollection($name)
    {
        $name = strtolower($name);

        if ($this->collections->containsKey($name)) {
            return $this->collections->get($name);
        }

        $this->collections->set($name, $this->createCollection($name));

        return $this->collections->get($name);
    }
539616
public function getTagsByName(string $name): array
    {
        $result = [];

        /** @var Tag $tag */
        foreach ($this->getTags() as $tag) {
            if ($tag->getName() !== $name) {
                continue;
            }

            $result[] = $tag;
        }

        return $result;
    }
348327
private function getSamples($name)
    {
        $data = $this->storage->getValues($name);
        $samples = [];
        foreach ($data as $row) {
            $samples[] = new Sample($name, $this->labelNames, $row[1], $row[0]);
        }

        return $samples;
    }
719983
public function getAggregation($name)
    {
        if ($this->aggregations && $this->aggregations->has($name)) {
            return $this->aggregations->get($name);
        } else {
            return null;
        }
    }
724018
public function getAggregation($name)
    {
        $data = $this->_response->getData();

        if (isset($data['aggregations']) && isset($data['aggregations'][$name])) {
            return $data['aggregations'][$name];
        }
        throw new InvalidException("This result set does not contain an aggregation named {$name}.");
    }
945301
public function getRelationship(string $name): array
    {
        if (array_key_exists($name, $this->relationships)) {
            return $this->relationships[$name];
        }

        return [];
    }