Get Emoji Map Array.

@return array
@throws TelegramEmojiMapFileNotFoundException
8224
protected function getEmojiMap()
    {
        if (!isset($this->emojiMapFile)) {
            $this->emojiMapFile = realpath(__DIR__.self::DEFAULT_EMOJI_MAP_FILE);
        }

        if (!file_exists($this->emojiMapFile)) {
            throw new TelegramEmojiMapFileNotFoundException();
        }

        return json_decode(file_get_contents($this->emojiMapFile), true);
    }
595241
protected function getRawIncludeMap(): array
    {
        $map = [];

        foreach ($this->includes as $includeKey => $definition) {
            if (\is_int($includeKey)) {
                $includeKey = $definition;
                $definition = null;
            }

            $settings = [];
            if (!empty($definition)) {
                $parts = preg_split('/\s*\|\s*/', $definition);
                foreach ($parts as $part) {
                    if (!preg_match('/^([^:]+)(:(.+))?$/', $part, $match)) {
                        throw new ParseDefinitionException("Unable to parse field definition for '{$includeKey}''");
                    }
                    // If only list() was viable ...
                    $directive = $match[1];
                    $val = $match[3] ?? null;
                    switch ($directive) {
                        case 'default':
                            $settings['default'] = true;
                            break;
                        case 'relation':
                            $settings['relation'] = !empty($val) ?
                                preg_split('/s*,\s*/', $val) : [$includeKey];
                            break;
                        case 'method':
                            if (!empty($val)) {
                                $settings['method'] = $val;
                            }
                            break;
                        case 'item':
                            $settings['resource_type'] = 'item';
                            break;
                        case 'collection':
                            $settings['resource_type'] = 'collection';
                            break;
                        default:
                            throw new ParseDefinitionException("Invalid key '{$directive}' for {$includeKey}");
                    }
                }
            }

            if (!isset($settings['relation'])) {
                $settings['relation'] = [];
            }
            if (!isset($settings['method'])) {
                $settings['method'] = 'include'.StrHelper::studlyCase($includeKey);
            }
            if (!isset($settings['default'])) {
                $settings['default'] = false;
            }
            if (!isset($settings['resource_type'])) {
                $settings['resource_type'] = null;
            }

            $map[$includeKey] = $settings;
        }

        return $map;
    }
1361446
protected function getFilesFromBrokenMap()
    {
        $mapParts = array_filter($this->brokenMap);

        $this->codeFrames = array_values(array_map(function ($frame) {
            if (count($frame) === 3) {
                [$file, $linesOfCode, $line] = $frame;
            }

            if (!$this->isValidFile($file)) {
                return new Codeframe($file, 0, [], trim($line));
            }

            $codes = $this->getTheCodeFromTheFile($file, (int) $linesOfCode);

            return new Codeframe($file, (int) $linesOfCode, $codes, trim($line));
        }, $mapParts));

        return $this;
    }
136855
public function getSmileyFiles()
    {
        $imgfiles = [];
        $filelist = scandir(ForumEnv::get('WEB_ROOT').'assets/img/smilies');
        $filelist = Container::get('hooks')->fire('model.admin.parser.get_smiley_files.filelist', $filelist);
        foreach ($filelist as $file) {
            if (preg_match('/\.(?:png|gif|jpe?g)$/', $file)) {
                $imgfiles[] = $file;
            }
        }
        $imgfiles = Container::get('hooks')->fire('model.admin.parser.get_smiley_files.imgfiles', $imgfiles);
        return $imgfiles;
    }
481517
public function featureEmojicons()
    {
        remove_action('wp_head', 'print_emoji_detection_script', 7);
        remove_action('admin_print_scripts', 'print_emoji_detection_script');
        remove_action('wp_print_styles', 'print_emoji_styles');
        remove_action('admin_print_styles', 'print_emoji_styles');
        remove_filter('the_content_feed', 'wp_staticize_emoji');
        remove_filter('comment_text_rss', 'wp_staticize_emoji');
        remove_filter('wp_mail', 'wp_staticize_emoji_for_email');

        add_filter('tiny_mce_plugins', function ($plugins) {
            return is_array($plugins) ? array_diff($plugins, ['wpemoji']) : [];
        });

        add_filter('wp_resource_hints', function ($urls, $relation_type) {
            if ('dns-prefetch' === $relation_type) {
                $emoji_url = 'https://s.w.org/images/core/emoji/';

                foreach ($urls as $key => $url) {
                    if (false !== strpos($url, $emoji_url)) {
                        unset($urls[$key]);
                    }
                }
            }

            return $urls;
        }, 10, 2);
    }
979986
function getEmojiGroups ()
{
    let result = [ ];
    let lines = fs.readFileSync (path.join (__dirname, 'data', 'emoji-test.txt'), { encoding: 'utf8' }).split ('\n');
    let groupName = "";
    let subgroupName = "";
    let matchFound;
    let subgroups;
    let characters;
    for (let line of lines)
    {
        if (line)
        {
            if (matchFound = line.match (/^# group: (.*)$/))
            {
                if (subgroupName)
                {
                    subgroups.push ({ name: subgroupName, characters: characters });
                }
                if (groupName)
                {
                    result.push ({ name: groupName, subgroups: subgroups });
                }
                groupName = matchFound[1];
                subgroups = [ ];
                subgroupName = "";
            }
            else if (matchFound = line.match (/^# subgroup: (.*)$/))
            {
                if (subgroupName)
                {
                    subgroups.push ({ name: subgroupName, characters: characters });
                }
                subgroupName = subgroupNames[matchFound[1]];
                characters = [ ];
            }
            else if (matchFound = line.match (/^#EOF$/))
            {
                if (subgroupName)
                {
                    subgroups.push ({ name: subgroupName, characters: characters });
                }
                if (groupName)
                {
                    result.push ({ name: groupName, subgroups: subgroups });
                }
            }
            else if (matchFound = line.match (/^#/))
            {
                // Ignore any other non-structured comments
            }
            else
            {
                let hashOffset = line.indexOf ('#');
                let data = line.substring (0, hashOffset);
                let fields = data.split (';');
                let codePoints = fields[0].trim ().split (' ');
                let status = fields[1].trim ();
                if ((status === "component") || (status === "fully-qualified"))
                {
                    let emojiString = "";
                    for (let codePoint of codePoints)
                    {
                        emojiString += String.fromCodePoint (parseInt (codePoint, 16));
                    }
                    characters.push (emojiString);
                }
            }
        }
    }
    return result;
}
927229
public function getMap() {
        $return_collection = new \Doctrine\Common\Collections\ArrayCollection($this->getCoordinate()->filter(function ($coordinate) {
                    return get_class($coordinate) == "Haven\PersonaBundle\Entity\Map";
                })->getValues());

        return $return_collection;
    }
666383
public function getMapping()
    {
        $response = $this->requestEndpoint(new Get());
        $data = $response->getData();

        $mapping = \array_shift($data);
        if (isset($mapping['mappings'])) {
            return $mapping['mappings'];
        }

        return [];
    }
22180
public function getEmoticonImages($params = [])
  {
      $defaults = [
          'emotesets' => null,
      ];

      return $this->wrapper->request('GET', 'chat/emoticon_images', ['query' => $this->resolveOptions($params, $defaults)]);
  }
159407
protected function getPriorityMap(): array
    {
        return [
            MessagePriority::VERY_LOW => 0,
            MessagePriority::LOW => 1,
            MessagePriority::NORMAL => 2,
            MessagePriority::HIGH => 3,
            MessagePriority::VERY_HIGH => 4,
        ];
    }
484970
public function getMappings()
    {
        if (isset($this->_mappings)) {
            return $this->_mappings;
        }

        $this->_mappings = array();

        $generatedLine = 1;
        $previousGeneratedColumn = 0;
        $previousOriginalLine = 0;
        $previousOriginalColumn = 0;
        $previousSource = 0;
        $previousName = 0;

        $str = $this->_map->mappings;
        $end = strlen($str);
        $pos = 0;

        while ($pos < $end) {
            if ($str[$pos] === ';') {
                $generatedLine++;
                $pos++;
                $previousGeneratedColumn = 0;
            } else if ($str[$pos] === ',') {
                $pos++;
            } else {
                $mapping = array();
                $mapping['generatedLine'] = $generatedLine;

                // Generated column.
                $value = Kwf_SourceMaps_Base64VLQ::decodePos($str, $pos);
                $mapping['generatedColumn'] = $previousGeneratedColumn + $value;
                $previousGeneratedColumn = $mapping['generatedColumn'];

                if ($pos < $end && !($str[$pos]==',' || $str[$pos]==';')) {
                    // Original source.
                    $value = Kwf_SourceMaps_Base64VLQ::decodePos($str, $pos);
                    $mapping['originalSource'] = (isset($this->_map->sourceRoot) ? $this->_map->sourceRoot.'/' : '')
                                                  . $this->_map->sources[$previousSource + $value];
                    $previousSource += $value;
                    if ($pos >= $end || ($str[$pos]==',' || $str[$pos]==';')) {
                        throw new Exception('Found a source, but no line and column');
                    }

                    // Original line.
                    $value = Kwf_SourceMaps_Base64VLQ::decodePos($str, $pos);
                    $mapping['originalLine'] = $previousOriginalLine + $value;
                    $previousOriginalLine = $mapping['originalLine'];
                    // Lines are stored 0-based
                    $mapping['originalLine'] += 1;
                    if ($pos >= $end || ($str[$pos] == ',' || $str[$pos] == ';')) {
                        throw new Exception('Found a source and line, but no column');
                    }

                    // Original column.
                    $value = Kwf_SourceMaps_Base64VLQ::decodePos($str, $pos);
                    $mapping['originalColumn'] = $previousOriginalColumn + $value;
                    $previousOriginalColumn = $mapping['originalColumn'];

                    if ($pos < $end && !($str[$pos] == ',' || $str[$pos] == ';')) {
                        // Original name.
                        $value = Kwf_SourceMaps_Base64VLQ::decodePos($str, $pos);
                        $mapping['originalName'] = $this->_map->names[$previousName + $value];
                        $previousName += $value;
                    } else {
                        $mapping['originalName'] = null;
                    }
                }
                $this->_mappings[] = $mapping;
            }
        }
        return $this->_mappings;
    }
578617
public function getMappers(): array
    {
        if (empty($this->mappers)) {
            $this->setMappers([
                new NicknameMapper($this->getNicknameDelimiters()),
                new SalutationMapper($this->getSalutations(), $this->getMaxSalutationIndex()),
                new SuffixMapper($this->getSuffixes()),
                new InitialMapper(),
                new LastnameMapper($this->getPrefixes()),
                new FirstnameMapper(),
                new MiddlenameMapper(),
            ]);
        }

        return $this->mappers;
    }
1186312
public function getArray()
    {
        $contents = include $this->context;

        if (gettype($contents) != 'array') {
            throw new InvalidFileException($this->context . ' does not return a valid array');
        }

        return $contents;
    }
623248
protected function getCustomAliases()
	{
		$custom = [];
		foreach ($this->aliases as $alias => $emoji)
		{
			if (!preg_match('(^:[-+_a-z0-9]+:$)D', $alias))
			{
				$custom[] = $alias;
			}
		}

		return $custom;
	}
1246043
public function toMappedArray()
    {
        $values = $this->toArray();
        $mappedValues = [];
        foreach ($values as $key => $value) {
            $mappedValues[$key] = $this->readMapped($key);
        }

        return $mappedValues;
    }
813642
public function toArray()
    {
        if ($this->hasAttachment) {
            return $this->attachmentMessageToArray();
        }

        if ($this->hasText) {
            //check if has buttons
            if (count($this->buttons) > 0) {
                return $this->buttonMessageToArray();
            }

            return $this->textMessageToArray();
        }

        if (count($this->cards) > 0) {
            return $this->genericMessageToArray();
        }

        throw CouldNotCreateMessage::dataNotProvided();
    }
407709
public function getStdOutAsArray() : array
    {
        if (null === $this->buffer) {
            $this->buffer = $this->textToBuffer();
        }
        return $this->buffer;
    }