Get id resource by name.

@param string $name
@return string
967871
public function getIdResourceByName(string $name): string
    {
        if (isset($this->resource[$name])) {
            return (string) $this->resource[$name]['id'];
        }
        return '';
    }
1363871
public function get($name) {
        $query = $this->queryAll();
        return isset($query[$name]) ? $query[$name] : null;
    }
168393
public static function getIdentifier(string $name) : string
    {
        static $salt;

        $salt   = $salt ?? $salt = self::loadBaseHashSalt();
        $suffix = substr(sha1($name . $salt), 0, 5);

        if (! preg_match(self::VALID_IDENTIFIER_FORMAT, $name)) {
            return self::DEFAULT_IDENTIFIER . $suffix;
        }

        return $name . $suffix;
    }
950682
public function getByName($name)
    {
        return isset($this->names[$name]) ? $this->names[$name] : null;
    }
562820
public function get($name)
    {
        $tid = $this->getTid($name);
        if (!isset($this->_containers[$tid])) {
            $this->_containers[$tid] = new Container([
                'manager' => $this,
            ]);
        }
        return $this->_containers[$tid]->get($name);
    }
1305539
public function getByName($name)
    {
        $group = new Group(
            $this->getContext(),
            new ResourcePathServiceOperation($this->getContext(), $this->getResourcePath(), "getbyname", array($name))
        );
        return $group;
    }
1164973
public function getByName($name)
    {
        if (array_key_exists($name, $this->tasks)) {
            return $this->tasks[$name];
        }

        return false;
    }
1214074
public function getId($resource): ?string
    {
        assert(get_class($resource) === static::MODEL);
        assert($this->classImplements(static::MODEL, ModelInterface::class) === true);

        /** @var ModelInterface $modelClass */
        $modelClass = static::MODEL;

        $pkName = $modelClass::getPrimaryKeyName();

        return $resource->{$pkName};
    }
1163380
public static function getResource(string $name)
    {
        $resource = static::getInstance($name)->getResource();

        if(RequestContext::exsits() && $resource)
        {
            static::pushResourceToRequestContext($resource);
        }

        return $resource;
    }
1114784
protected function getTid($name)
    {
        $tid  = Coroutine::tid();
        $mode = $this->getCoroutineMode($name);
        if ($mode === false) {
            $tid = -2;
        }
        if ($mode == ComponentInterface::COROUTINE_MODE_REFERENCE) {
            $tid = -1;
        }
        return $tid;
    }
992486
public function getByName($name)
    {
        if (!isset($this->nameMap[$name])) {
            return null;
        }

        return $this->get($this->nameMap[$name]);
    }
338716
protected function getPathToRelationshipId(string $name): string
    {
        return $this->getPathToRelationship($name) . '/' .
            DocumentInterface::KEYWORD_DATA . '/' . DocumentInterface::KEYWORD_ID;
    }
4024
public function get($name)
    {
        if (empty($this->data[$name])) {
            return null;
        }

        return $this->data[$name];
    }
1316348
protected function getLogTypeByName($name)
    {
        $type = LogTypes::where('name', $name)->first();
        if (is_null($type)) {
            $type = new LogTypes(['name' => $name]);
            $type->save();
        }
        return $type->id;
    }
142132
private function getGroupIdByName(string $name)
    {
        if (!isset($this->groups)) {
            $this->resetCraftFieldsServiceGroupsCache();

            $this->groups = [];
            foreach (Craft::$app->fields->getAllGroups() as $group) {
                $this->groups[$group->name] = $group->id;
            }
        }
        if (!array_key_exists($name, $this->groups)) {
            $group = new FieldGroup(['name' => $name]);
            if (Craft::$app->fields->saveGroup($group)) {
                $this->groups[$name] = $group->id;
            } else {
                return Schematic::importError($group, $name);
            }
        }

        return $this->groups[$name];
    }
1189559
public function getValue($name) {
    // return pk values as they are parts of the oid
    $mapper = ObjectFactory::getInstance('persistenceFacade')->getMapper($this->getType());
    $pkNames = $mapper->getPkNames();
    for ($i=0, $count=sizeof($pkNames); $i<$count; $i++) {
      if ($name == $pkNames[$i]) {
        $ids = $this->oid->getId();
        return $ids[$i];
      }
    }
    return $this->__call(__FUNCTION__, [$name]);
  }
459720
public static function tryGetResource(string $name)
    {
        $resource = static::getInstance($name)->tryGetResource();
        if(!$resource)
        {
            static::pushResourceToRequestContext($resource);
        }
        return $resource;
    }