@param string $uuid

@return Project
775081
public function getProject($uuid)
    {
        $request = $this->client->createRequest('GET', sprintf('/api/projects/%s', $uuid));

        return $this->serializer->deserialize(
            (string) $this->send($request)->getBody(),
            'SensioLabs\Insight\Sdk\Model\Project',
            'xml'
        );
    }
275681
public function getQuestion($uuid)
    {
        $found = null;
        foreach ($this->stepQuestions as $stepQuestion) {
            if ($stepQuestion->getQuestion()->getUuid() === $uuid) {
                $found = $stepQuestion->getQuestion();
                break;
            }
        }

        return $found;
    }
1301000
public function getBuildReport($uuid)
    {
        $self = $this;

        return new Report(function () use ($self, $uuid) {
            return $self->doGetReport($uuid, 'build');
        });
    }
528528
public function getPathFromUuid($uuid, $checkIfExists = true)
    {
        if (null !== ($file = $this->framework->getAdapter(FilesModel::class)->findByUuid($uuid))) {
            if (!$checkIfExists) {
                return $file->path;
            }

            $a = $this->container->getParameter('kernel.project_dir');
            $b = $file->path;
            $path = $this->container->getParameter('kernel.project_dir').'/'.$file->path;

            if (file_exists($this->container->getParameter('kernel.project_dir').'/'.$file->path)) {
                return $file->path;
            }
        }

        return null;
    }
413302
protected function findRoute($uuid)
    {
        $document = $this->documentManager->find($uuid);

        if (!$document instanceof RouteDocument) {
            return;
        }

        return $document;
    }
242184
public function whereUuidKey($uuid)
    {
        if (is_array($uuid) || $uuid instanceof Arrayable) {
            $this->query->whereIn($this->model->getQualifiedUuidKeyName(), $uuid);

            return $this;
        }

        return $this->where($this->model->getQualifiedUuidKeyName(), '=', $uuid);
    }
274070
public function generateGameResult($uuid) {
    /** @var \Drupal\openy_campaign\Entity\MemberGame $game */
    $game = $this->entityRepository->loadEntityByUuid('openy_campaign_member_game', $uuid);

    $result = $game->result->value;
    /** @var \Drupal\Node\Entity\Node $campaign */
    $campaign = $game->member->entity->campaign->entity;

    if (!empty($result)) {
      return [
        'already_used_chance' => TRUE,
      ];
    }

    $expected = $campaign->field_campaign_expected_visits->value;
    $coefficient = $campaign->field_campaign_prize_coefficient->value;
    $ranges = [];

    $previousRange = 0;
    foreach ($campaign->field_campaign_prizes as $target) {
      /** @var \Drupal\paragraphs\Entity\Paragraph $prize */
      $prize = $target->entity;
      $amount = $prize->field_prgf_prize_amount->value;
      if ($amount == 0) {
        continue;
      }
      $nextRange = $previousRange + ceil($prize->field_prgf_prize_amount->value * $coefficient);

      $ranges[] = [
        'min' => $previousRange,
        'max' => $nextRange,
        'description' => $prize->field_prgf_prize_description->value,
        'prize' => $prize,
      ];

      $previousRange = $nextRange;
    }

    $isWinner = FALSE;
    $randomNumber = mt_rand(0, $expected);
    $result = $campaign->field_campaign_prize_nowin->value;
    if (empty($result)) {
      $result = $this->t('Did not win.');
    }
    foreach ($ranges as $range) {
      if ($randomNumber >= $range['min'] && $randomNumber < $range['max']) {
        $result = $range['description'];
        $isWinner = TRUE;

        // Decrease an amount of the prizes.
        $prize = $range['prize'];
        $amount = $prize->field_prgf_prize_amount->value;
        $prize->set('field_prgf_prize_amount', $amount - 1);
        $prize->save();

        break;
      }
    }

    $logMessage = json_encode([
      'number' => $randomNumber,
      'expected' => $expected,
      'coeff' => $coefficient,
      'ranges' => array_map(function ($item) {
        //return $item['min'] . '-' . $item['max'] . ':' . substr($item['description'], 0, 10);
        return $item['min'] . '-' . $item['max'];
      }, $ranges),
    ]);

    $game->result->value = $result;
    $game->date = $this->time->getRequestTime();
    $game->log->value = $logMessage;
    $game->save();

    return [
      'is_winner' => $isWinner,
      'result' => $result,
    ];

  }
1135371
private function getContaoFile($uuid)
    {
        $uuid = StringUtil::deserialize($uuid);

        if (is_array($uuid)) return FilesModel::findMultipleByUuids($uuid);
        return FilesModel::findByUuid($uuid);
    }
325821
public function getNodeData($uuid)
	{
		$request = new client\Request('/api/idnode/load', array(
			'uuid'=>$uuid,
			'meta'=>0));

		$response = $this->_client->getResponse($request);
		$content = json_decode($response->getContent());

		if (count($content->entries) > 0)
			return $content->entries[0];
		else
			return null;
	}
1312521
private function getResource($uuid, $locale)
    {
        return $this->proxyFactory->createProxy(
            ArticleDocument::class,
            function (
                &$wrappedObject,
                LazyLoadingInterface $proxy,
                $method,
                array $parameters,
                &$initializer
            ) use ($uuid, $locale) {
                $initializer = null;
                $wrappedObject = $this->documentManager->find($uuid, $locale);

                return true;
            }
        );
    }
43208
public function upload($uuid = null)
    {
        if ($uuid) {
            // strip everything but valid UUID chars
            $uuid = preg_replace('/[^a-z\-0-9]/', '', $uuid);
        } else {
            $uuid = Text::uuid();
        }

        $options = [
            'upload_dir' => Configure::read('Attachments.tmpUploadsPath') . DS . $uuid . DS,
            // FIXME Make file paths configurable
            'accept_file_types' => Configure::read('Attachments.acceptedFileTypes')
        ];

        $uploadHandler = new \UploadHandler($options);
        exit;
    }
185021
private function resolvePathByUuid($uuid)
    {
        $queryBuilder = new QueryBuilder($this->qomFactory);

        $queryBuilder
            ->select('node', 'jcr:uuid', 'uuid')
            ->from($this->qomFactory->selector('node', 'nt:unstructured'))
            ->where(
                $this->qomFactory->comparison(
                    $this->qomFactory->propertyValue('node', 'jcr:uuid'),
                    '=',
                    $this->qomFactory->literal($uuid)
                )
            );

        $rows = $queryBuilder->execute();

        if (1 !== count(iterator_to_array($rows->getRows()))) {
            throw new ItemNotFoundException();
        }

        return $rows->getRows()->current()->getPath();
    }
682118
public function newUuid(){
        $q = Db::query('SELECT REPLACE(UUID(),"-","") as id');

        while($row = $q['result']->fetch_assoc()){
            $this->uuid = strtoupper($row['id']);
        }
        return $this;
    }
1076057
public function getContent(UuidInterface $uuid)
    {
        $formatter = self::$formatters[$uuid->getVersion()];

        return $formatter->getContent($uuid);
    }
1183611
public function getOneByUuid($uuid)
	{
		$identifierPayload = $this->aggregate[IdentifierServiceProvider::getProviderKey()]->first(
			['filter' => ['uuid' => $uuid]]
		);

		if($identifierPayload->getStatus() != 'found')
		{
			return $identifierPayload;
		}

		return $this->aggregate[$this->formatEntityType($identifierPayload->getData()->getEntityType())]->first(
			['filter' => ['id' => $identifierPayload->getData()->getEntityKey()]]
		);
	}
25326
public Observable<Project> getProjectAsync(UUID projectId) {
        return getProjectWithServiceResponseAsync(projectId).map(new Func1<ServiceResponse<Project>, Project>() {
            @Override
            public Project call(ServiceResponse<Project> response) {
                return response.body();
            }
        });
    }
94855
public function getOddItem($uuid)
    {
        $found = null;
        foreach ($this->oddItems as $oddItem) {
            if ($oddItem->getItem()->getUuid() === $uuid) {
                $found = $oddItem;
                break;
            }
        }

        return $found;
    }