@param string $id

@throws HttpException

@return CertificateEntity
194063
public function getById($id)
    {
        $certificate = $this->adapter->get(sprintf('%s/certificates/%s', $this->endpoint, $id));

        $certificate = json_decode($certificate);

        return new CertificateEntity($certificate->certificate);
    }
1220692
private function resolveInstance(string $id)
    {
        if (Validator::key($id)->validate($this->instances)) {
            return $this->instances[$id];
        }
        return $this->resolveAutomaticResolvable($id);
    }
1174148
public function findById($id)
    {
        if (null === ($entity = $this->find($id))) {
            throw RestException::createNotFound($id, $this->getResourceKey(), sprintf(
                'Entity of type `%s` not found.', $this->getClassName()
            ));
        }

        if (!$entity instanceof JsonApiResource) {
            throw RestException::notJsonApiResource($entity);
        }

        return $entity;
    }
1253763
public function getById($id)
    {
        $volume = $this->adapter->get(sprintf('%s/volumes/%s?per_page=%d', $this->endpoint, $id, 200));

        $volume = json_decode($volume);

        return new VolumeEntity($volume->volume);
    }
176382
public function certificate($serverId, $siteId, $certificateId)
    {
        return new Certificate(
            $this->get("servers/$serverId/sites/$siteId/certificates/$certificateId")['certificate']
            + ['server_id' => $serverId, 'site_id' => $siteId], $this
        );
    }
1287857
public function setId($id)
    {
        if (!is_null($id)) {
            $id = (string) $id;
        }

        $this->id = $id;
        return $this;
    }
1205026
public function getEntity($id = 0)
    {
        try {
            $q = $this->createQueryBuilder($this->getTableAlias());
            if (is_array($id)) {
                $this->buildSelectClause($q, $id);
                $extendedFieldId = $id['id'];
            } else {
                $extendedFieldId = $id;
            }
            $idArray   = explode('@', $extendedFieldId);
            $leadId    = isset($idArray[0]) && !is_null($idArray[0]) ? $idArray[0] : null;
            $leadField = isset($idArray[1]) && !is_null($idArray[1]) ? $idArray[1] : null;
            $q->andWhere($this->getTableAlias().'.lead = '.$leadId);
            $q->andWhere($this->getTableAlias().'.leadField = '.$leadField);
            $entity = $q->getQuery()->getSingleResult();
        } catch (\Exception $e) {
            $entity = null;
        }

        if (null != $entity && isset($extendedFieldId)) {
            // @todo - likely needs refactoring...
            $fieldValues = $this->getFieldValues($extendedFieldId, true, 'extendedField');
            $entity->setFields($fieldValues);
        }

        return $entity;
    }
174914
public function finalize($id)
    {
        try {
            if (trim($id) == "") {
                throw new Exception\NotFound();
            }

            $path = $this->_config->merchantPath() . '/disputes/' . $id . '/finalize';
            $response = $this->_http->put($path);

            if (isset($response['apiErrorResponse'])) {
                return new Result\Error($response['apiErrorResponse']);
            }

            return new Result\Successful();
        } catch (Exception\NotFound $e) {
            throw new Exception\NotFound('dispute with id "' . $id . '" not found');
        }
    }
627852
public function get($id)
    {
        try {
            $em = $this->entityManager->getDoctrineEntityManager();
            $accessEntity = $em->getRepository($this->getEntityClass())->findOneBy(array(
                'id' => $id,
            ));
            
            if ($accessEntity !== null) {
                return $accessEntity;
            }
            
            return false;
        } catch (\Exception $e) {
            throw new Exception('Cannot load the entity from the database for the given id "' . $id . '".', 0, $e);
        }
    }
415158
public function getEntityById($id)
    {
        return isset($this->entitiesById[$id]) ? $this->entitiesById[$id] : null;
    }
1307685
public function getById($id): ?AbstractEntity
    {
        $entity = $this->getRepository()->findById($id);

        if ($entity instanceof AbstractEntity) {
            $this->prepareEntityForGet($entity);
        }

        return $entity;
    }
510868
public function getContentById($id)
    {
        return $this->om->getRepository($this->configurationManager->getEntityClass('content'))->find($id);
    }
106482
public static function factory($id)
    {
        $id = (string)$id;
        if (!isset(static::$permissions[$id])) {
            static::$permissions[$id] = new static($id);
        }
        return static::$permissions[$id];
    }
563921
public function setCacheableIdentifier(string $id = null, int $length = null): self
    {
        if ($id) {
            if (!preg_match('/^[a-zA-Z0-9\_\-\~\.]{8,32}$/', $id)) {
                throw new CacheException('Invalid value passed to "setCacheableIdentifier" method');
            }

            $this->cacheableId = $id;
            $this->cacheableIdLength = strlen($id);
        }

        if ($length) {
            if ($length < 100 || $length <= $this->cacheableIdLength) {
                throw new CacheException('Length of encoded Cacheable objects must start from at least 100');
            }

            $this->cacheableLengthFrom = $length;
        }

        return $this;
    }
471455
protected function prepareId($id) {
		if (! is_scalar($id)) {
			$id = json_encode($id);
			
			if (isset($id[33])) {
				$id = md5($id);
			}
		}
		
		if ($this->namespace === null) {
			return $id;
		}
		
		return $this->namespace . '_' . $id;
	}
582079
public function getById($domainName, $id)
    {
        $domainRecords = $this->adapter->get(sprintf('%s/domains/%s/records/%d', $this->endpoint, $domainName, $id));

        $domainRecords = json_decode($domainRecords);

        return new DomainRecordEntity($domainRecords->domain_record);
    }
573648
public function getEntity($id = null)
    {
        if (null === $id) {
            $entity           = new ContactSource();
            $defaultUtmSource = $this->getRepository()->getDefaultUTMSource();
            $entity->setUtmSource($defaultUtmSource);

            return $entity;
        }

        if ('clone' == $this->dispatcher->getContainer()->get('request')->attributes->get('objectAction')) {
            $entity           = parent::getEntity($id);
            $defaultUtmSource = $this->getRepository()->getDefaultUTMSource();
            $entity->setUtmSource($defaultUtmSource);

            return $entity;
        }

        return parent::getEntity($id);
    }