return a association performancelevel

@param string performancelevel id

@return Performancelevel
979723
public function findAssociationPerformancelevelByID($id)
    {
        $performancelevels = $this->findAssociationPerformancelevels()->getPerformancelevels();

        $performancelevels->rewind();

        while ($performancelevels->valid()) {
            $performancelevel = $performancelevels->current();
            if ($performancelevel->getID() == $id) {
                return $performancelevel;
            }

            $performancelevels->next();
        }
    }
709167
function getPrevLevel($level)
    {
        $levels = $this->getLevels();
        $level_incdeces = $this->getLevelIndeces();
        $level_index = $level_incdeces[$level];
        if (!isset($levels[$level_index - 1])) {
            return false;
        }
        $prev_level = $levels[$level_index - 1];
        return $prev_level;
    }
199894
public com.google.api.ads.adwords.axis.v201809.cm.Level getLevel() {
        return level;
    }
744051
protected function getLevel()
  {
    if($this->currObj instanceof TeamSpeak3_Node_Channel)
    {
      return $this->currObj->getLevel()+2;
    }
    elseif($this->currObj instanceof TeamSpeak3_Node_Client)
    {
      return $this->currObj->channelGetById($this->currObj->cid)->getLevel()+3;
    }

    return 1;
  }
42873
public function getAlliance($id): ?\GameBackend\Entity\SRO\Shard\AllianceInterface
    {
        /** @var \GameBackend\Entity\SRO\Shard\Repository\Alliance $allianceRepository */
        $allianceRepository = $this->getShardEntityManager()->getRepository($this->getGameOptions()->getEntityShardAlliance());
        return $allianceRepository->getAlliance4Id($id);
    }
1176024
public function getLevels(int $from = 1, ?int $to = null, ?callable $callback = null): array
    {
        $parts = explode('.', $this->env);
        $n = isset($to) ? min(count($parts), $to) : count($parts);

        $levels = [];

        for ($i = $from; $i <= $n; $i++) {
            $level = join('.', array_slice($parts, 0, $i));
            $levels[] = isset($callback) ? $callback($level) : $level;
        }

        return $levels;
    }
1202706
protected int _level(int identity)
  {
    while (identity>=m_size)
    {
      boolean isMore = nextNode();
      if (!isMore && identity >= m_size)
        return NULL;
    }

    int i=0;
    while(NULL != (identity=_parent(identity)))
      ++i;
    return i;
  }
914036
function getAssociation($server_url, $handle = null)
    {
        // simple case: handle given
        if ($handle !== null) {
            // get association, return null if failed
            $association = $this->connection->get(
                $this->associationKey($server_url, $handle));
            return $association ? $association : null;
        }

        // no handle given, working with list
        // create key for list of associations
        $serverKey = $this->associationServerKey($server_url);

        // get list of associations
        $serverAssociations = $this->connection->get($serverKey);
        // return null if failed or got empty list
        if (!$serverAssociations) {
            return null;
        }

        // get key of most recently issued association
        $keys = array_keys($serverAssociations);
        sort($keys);
        $lastKey = $serverAssociations[array_pop($keys)];

        // get association, return null if failed
        $association = $this->connection->get($lastKey);
        return $association ? $association : null;
    }
137946
private function getRowLevel(string $id, int $lvl = 0)
    {
        reset($this->child_ids);

        foreach ($this->child_ids as $pid => $data) {
            if (!\in_array($id, $data['children'], true)) {
                continue;
            }
            if (!$pid) {
                return $lvl;
            }
            $lvl += $this->getRowLevel((string)$pid, $lvl++);
            break;
        }

        if ($lvl > $this->_max_level) {
            $this->_max_level = $lvl;
        }

        return $lvl;
    }
982886
public static function getLevel($level = null) {

        $level = strtoupper($level);

        if ( array_key_exists($level, self::$levels) ) return self::$levels[$level];

        return self::$levels[self::DEFAULT_LOG_LEVEL];

    }
988820
public function spouse(Individual $person, $access_level = null): ?Individual
    {
        if ($person === $this->wife) {
            return $this->husband($access_level);
        }

        return $this->wife($access_level);
    }
294296
@Override
  public Integer getScanCountAtMsLevel(int msLevel) {
    TreeMap<Integer, IScan> msLevelScanMap = getMapMsLevel2index().get(msLevel).getNum2scan();
    if (msLevelScanMap != null) {
      return msLevelScanMap.size();
    }
    return null;
  }
387828
protected function normalizeAssociation($association, $name, $format = null, array $context = array())
    {
        if ($association === null) {
            return;
        }

        $hint = $this->getHintFromObject($association);
        $ids = $this->getIdentifierFromObject($association);
        $id = $this->getIdentifiersAsString($ids);
        $data = array_merge($hint, $ids);
        $objectId = current($hint).'#'.$id;

        if (isset($context['@references'][$objectId])) {
            return $data;
        }

        $context['@references'][$objectId] = false;
        if ($association instanceof Proxy and !$association->__isInitialized()) {
            return $data;
        }

        $normalized = $this->serializer->normalize($association, $format, $context);

        $context['@references'][$objectId] = $normalized;

        return $data;
    }
1327908
def get_id2obj_cur_n_high(self, id2obj_user, id_sources):
        """"""
        if not self.relationships:
            self._get_id2obj_high(id2obj_user, id_sources, self.fill_parentidid2obj_r0)
        else:
            self._get_id2obj_high(id2obj_user, id_sources, self.fill_parentidid2obj_r1)
568005
public static function getLevelSeverity($level)
    {
        if (($index = array_search($level, self::getValues(), true)) === false) {
            throw new \InvalidArgumentException(sprintf('Unknown level "%s"', $level));
        }

        return $index;
    }
1166652
public function getTranslation($language_id = null)
    {
        /** @var ActiveRecord $translation */

        /** @var \DevGroup\Multilingual\Multilingual $multilingual */
        $multilingual = Yii::$app->multilingual;
        if ($language_id === null) {
            $language_id = $multilingual->language_id;
        }
        /** @var ActiveRecord $owner */
        $owner = $this->owner;
        if ($language_id === $multilingual->language_id && !$owner->isRelationPopulated($this->translationRelation)) {
            $language_id = $multilingual->language_id;
            $translation = $owner->{$this->defaultTranslationRelation};
            if ($translation !== null) {
                return $translation;
            }
        } else {
            // language id specified and it's not default
            $translations = $owner->{$this->translationRelation};
            foreach ($translations as $item) {
                if ($item->language_id === $language_id) {
                    return $item;
                }
            }
        }
        // translation does not exists!

        /** @var ActiveRecord $class */
        $class = $this->getTranslationModelClassName();
        /** @var ActiveRecord $translation */
        $translation = new $class();
        $translation->loadDefaultValues();
        $translation->setAttribute('language_id', $language_id);

        $translations = $this->owner->{$this->translationRelation};
        $translations[] = $translation;

        $owner->populateRelation($this->translationRelation, $translations);


        if ($language_id === $multilingual->language_id) {
            $owner->populateRelation($this->defaultTranslationRelation, $translation);
        }

        return $translation;
    }
187074
public function PerformantLevel($level) {
		$menuNode = $this->asDataNode();
		$stack = array();
		if ($menuNode) {
			$parent = $menuNode;
			$stack[] = $parent;
			while ($parent = $parent->getParent()) {
				array_unshift($stack, $parent);
			}
		}
		return isset($stack[$level - 1]) ? $stack[$level - 1] : null;
	}