@param $listUuid

@return mixed
329639
public function getCounter($listUuid)
    {
        if ($this->existsListInIndex($listUuid)) {
            $index = $this->getIndex($listUuid);

            return $index['size'];
        }

        return 0;
    }
206564
public function setUuid($uuid)
    {
        if (!is_null($uuid)) {
            $uuid = (string) $uuid;
        }

        $this->uuid = $uuid;
        return $this;
    }
275051
public function getMergeFields($listId)
    {
        $result = $this->mailchimp->get("lists/$listId/merge-fields");

        # Handle mailchimp default count limit
        if ($result['total_items'] > self::MAILCHIMP_DEFAULT_COUNT_LIMIT) {
            $result = $this->mailchimp->get("lists/$listId/merge-fields", array("count" => $result['total_items']));
        }

        if (!$this->mailchimp->success()) {
            $this->throwMailchimpError($this->mailchimp->getLastResponse());
        }

        return $result['merge_fields'];
    }
889022
public function updateTtl($listUuid, $ttl)
    {
        if (!$this->findListByUuid($listUuid)) {
            throw new ListDoesNotExistsException('List '.$listUuid.' does not exists in memory.');
        }

        $ttl = ($ttl > 0) ? $ttl : null;

        // update ttl of all chunks
        $numberOfChunks = $this->getNumberOfChunks($listUuid);
        for ($i = 1; $i <= $numberOfChunks; ++$i) {
            $chunkNumber = (string) $listUuid.self::SEPARATOR.self::CHUNK.'-'.$i;
            $storedListInChunk = apcu_fetch($chunkNumber);
            apcu_delete((string) $chunkNumber);
            apcu_store(
                (string) $chunkNumber,
                $storedListInChunk,
                $ttl
            );
        }

        // update ttl of headers array (if present)
        if ($this->getHeaders($listUuid)) {
            $headers = (string) $listUuid.self::SEPARATOR.self::HEADERS;
            $storedHeaders = apcu_fetch($headers);
            apcu_delete((string) $headers);
            apcu_store(
                (string) $headers,
                $storedHeaders,
                $ttl
            );
        }

        // update index
        $this->addOrUpdateListToIndex(
            (string) $listUuid,
            $this->getCounter((string) $listUuid),
            $this->getNumberOfChunks((string) $listUuid),
            $this->getChunkSize((string) $listUuid),
            $ttl
        );
    }
1365395
public function getTags($postUuid)
    {
        $event = new GenericDataEvent([
            'class' => 'Icap\BlogBundle\Entity\Post',
            'ids' => [$postUuid],
        ]);

        $this->eventDispatcher->dispatch(
            'claroline_retrieve_used_tags_by_class_and_ids',
            $event
        );
        $tags = $event->getResponse();

        return $tags;
    }
124770
public function exists($listUuid)
    {
        $listFirstChunk = $this->memcached->get($listUuid.self::SEPARATOR.self::CHUNK.'-1');

        if (false === $listFirstChunk) {
            return false;
        }

        return true;
    }
555226
public function getHeaders($listUuid)
    {
        $sql = 'SELECT
                `headers`
                FROM `'.self::LIST_COLLECTION_TABLE_NAME.'` 
                WHERE `uuid` = :uuid';

        $stmt = $this->pdo->prepare($sql);
        $stmt->bindParam(':uuid', $listUuid);
        $stmt->execute();

        if ($list = $stmt->fetchAll(\PDO::FETCH_ASSOC)) {
            $headers = $list[0]['headers'];

            if (SerializeChecker::isSerialized($headers)) {
                return unserialize($headers);
            }

            return $headers;
        }

        return null;
    }
1222737
public function getQuestion($questionUuid)
    {
        $question = null;

        if (empty($this->decodedStructure)) {
            $this->decodeStructure();
        }

        foreach ($this->decodedStructure['steps'] as $step) {
            foreach ($step['items'] as $item) {
                if ($item['id'] === $questionUuid) {
                    $question = $item;
                    break 2;
                }
            }
        }

        return $question;
    }
881768
public function convertToCompliantUuid($uuid=false){
        $id = ($uuid?$uuid:$this->uuid);
        $arr = [8, 13, 18, 23];
        foreach ($arr as $part){
            $id = substr_replace($id, '-', $part, 0);
        }
        return $id;
    }
407421
public function getAction($uuid, Request $request)
    {
        $locale = $this->getRequestParameter($request, 'locale', true);
        $document = $this->getDocumentManager()->find(
            $uuid,
            $locale
        );

        return $this->handleView(
            $this->view($document)->setSerializationContext(
                SerializationContext::create()
                    ->setSerializeNull(true)
                    ->setGroups(['defaultPage', 'defaultArticle', 'smallArticlePage'])
            )
        );
    }
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;
	}
685021
public function removeListFromIndex($listUuid)
    {
        $index = $this->memcached->get(ListRepositoryInterface::INDEX);

        unset($index[(string) $listUuid]);
        $this->memcached->replace(ListRepositoryInterface::INDEX, $index);
    }
665747
public function DumpList($options = array(), $listId = false) {
        $api = $this->url . 'list/';
        if (!$listId)
            $listId = $this->listId;
        $payload = array_merge(array('id' => $this->listId), $options);
        $data = $this->requestMonkey($api, $payload, true);
        if (empty($data) || !isset($data))
            return $data;
        $result = preg_split('/$\R?^/m', $data);

        $headerArray = json_decode($result[0]);
        unset($result[0]);

        $data = array();
        foreach ($result as $value) {
            $data[] = array_combine($headerArray, json_decode($value));
        }

        return $data;
    }
855989
public function getIndex($listUuid = null)
    {
        $indexKey = ListRepositoryInterface::INDEX;
        $index = apcu_fetch($indexKey);
        $this->removeExpiredListsFromIndex($index);

        if ($listUuid) {
            return (isset($index[(string) $listUuid])) ? unserialize($index[(string) $listUuid]) : null;
        }

        return ($index) ? array_map('unserialize', $index) : [];
    }
567184
public function exists($listUuid)
    {
        $listFirstChunk = apcu_fetch($listUuid.self::SEPARATOR.self::CHUNK.'-1');

        return isset($listFirstChunk);
    }
395200
public function show($uuid)
    {
        if ($uuid instanceof Service) {
            $uuid = $uuid->getUuid();
        }

        $response = $this->httpClient->get(
            $this->getResourceUrl($uuid),
            []
        );

        return ServiceResponse::createFromHttpResponse($response);
    }
193214
public function setList($id, $listId)
    {
        return $this->put($this->getPath().'/'.rawurlencode($id).'/idList', array('value' => $listId));
    }