Get information about a particular language, given the language ID.

@param int $identifier The language ID

@return Language
@throws ParseException
@throws UnauthorizedException
@throws ResourceNotFoundException
@throws Exception
968962
public function getLanguage(int $identifier): Language
    {
        $json = $this->parent->performAPICallWithJsonResponse('get', sprintf('/languages/%d', $identifier));
        return DataParser::parseData($json, Language::class);
    }
967282
public function retrieveById($identifier) {
        if (!$this->isValidIdentifierValue($identifier)) {
            return null;
        }
        /** @var RecordInterface $user */
        $user = $this->createEmptyUserRecord()->fromPrimaryKey($identifier, [], $this->getRelationsToFetch());

        return $this->validateUser($user, null);
    }
394872
public function setIdentifier(Identifier $identifier)
    {
        if ($this->identifier !== null) {
            //TODO: throw exception
        }

        $this->identifier = $identifier;

        return $this;
    }
1193547
public function searchTranslationUnit(string $identifier): ?XmlElement
    {
        if ('' === $identifier) {
            throw new \InvalidArgumentException('Empty Id passed.', 0);
        }

        if ($this->documentElement
            && $this->documentElement->isDefaultNamespace(self::XLIFF_NS)
            && $transUnit = $this->getXPathFirstItem(
                '/xlf:xliff/xlf:file/xlf:body/xlf:trans-unit[@id=\'' . $identifier . '\']'
            )) {
            /** @var XmlElement $transUnit */
            return $transUnit;
        }

        if ($transUnit = $this->getXPathFirstItem(
            '/xlf:xliff/xlf:file/xlf:body/xlf:trans-unit[@xlf:id=\'' . $identifier . '\']'
        )) {
            /** @var XmlElement $transUnit */
            return $transUnit;
        }

        return null;
    }
946236
private function loadContentType(string $identifier): ContentType
    {
        return $this->repository->sudo(
            static function (Repository $repository) use ($identifier): ContentType {
                return $repository->getContentTypeService()->loadContentTypeByIdentifier($identifier);
            }
        );
    }
227447
public function retrieveByToken($identifier, $token) {
		$m = $this->modelName;
		return $m::findForAuthToken($identifier, $token);
	}
576685
public function findByIdentifier($identifier) {
		$accessTokenResult = $this->cache->get($identifier);
		if ($accessTokenResult instanceof AccessToken) {
			return $accessTokenResult;
		}
		return NULL;
	}
764959
public function offsetGet($identifier)
    {
        $keys = $this->_parseIdentifier($identifier);

        $result = $this->toArray();
        foreach($keys as $key)
        {
            if(is_array($result) && array_key_exists($key, $result)) {
                $result = $result[$key];
            } else {
                $result = null;
                break;
            }
        }

        return $result;
    }
387571
public function retrieveByID($identifier)
	{
		$result = @ldap_read($this->conn, $identifier, '(objectclass=*)', $this->config['attributes']);
		if ($result === FALSE)
			return null;

		$entries = ldap_get_entries($this->conn, $result);
		if ($entries['count'] == 0 || $entries['count'] > 1)
			return null;

		return $this->clean($entries[0]);
	}
929037
public function getType($identifier)
    {
        return isset($this->types[$identifier])? $this->types[$identifier]: null;
    }
289606
public function parseIdentifier(ObjectIdentifier $identifier)
    {
        $info = parent::parseIdentifier($identifier);

        $path  = $identifier->path;

        //Allow locating default classes if $path is empty.
        if(empty($path))
        {
            $info['path']    = $info['file'];
            $info['file']    = '';
            $info['package'] = '';
        }
        else
        {
            $package = array_shift($path);

            $info['path']    = StringInflector::implode($path);
            $info['package'] = ucfirst($package);
        }

        //Make an exception for 'view' and 'module' types
        if(in_array($info['package'], array('View','Module')) && !in_array('behavior', $path)) {
            $info['path'] = '';
        }

        return $info;
    }
657462
public function getComposerInformation($identifier)
    {
        $composerFileContent = $this->getFileContent($this->filename, $identifier);

        return !$composerFileContent
            ? null
            : json_decode($composerFileContent, true);
    }
1354056
public function retrieveByToken($identifier, $token)
    {
        $userModel = $this->createUserModel();

        return $userModel->newQuery()
            ->where($userModel->getKeyName(), $identifier)
            ->where($userModel->getRememberTokenName(), $token)
            ->first();
    }
1162114
public function retrieveByToken($identifier, $token)
    {
        $user = $this->getGenericUser(
            $this->conn->table($this->table)->find($identifier)
        );

        return $user && $user->getRememberToken() && hash_equals($user->getRememberToken(), $token)
                    ? $user : null;
    }
1233455
public function findByIdentifier($identifier)
    {
        if (!isset($this->plugins[$identifier])) {
            $identifier = $this->normalizeIdentifier($identifier);
        }

        if (!isset($this->plugins[$identifier])) {
            return null;
        }

        return $this->plugins[$identifier];
    }
416655
public function retrieveByToken($identifier, $token)
	{
		if (Authorizer::validateAccessToken(false, $token)) {
			return $this->retrieveById(Authorizer::getResourceOwnerId());
		}

		return null;
	}
1219023
public function findStandardIdentityByIdentifier(string $identifier): Entity\StandardIdentity
    {
        $identity = new Entity\StandardIdentity;
        $identity->setIdentifier($identifier);

        $this->repository->load($identity);

        if ($identity->getId() === null) {
            $this->logger->notice('identity not found', [
                'input' => [
                    'identifier' => $identifier,
                ],
            ]);

            throw new IdentityNotFound;
        }

        return $identity;
    }