Gets an ordered list of language label suffixes that should be tried to
get localizations in the preferred order of formality.

@return string[] ordered list of suffixes from "", "_formal" and "_informal", will not be empty
14122
private function getSuffixesToTry()
    {
        if ($this->suffixesToTry === null) {
            $this->suffixesToTry = [];

            if (isset($this->conf['salutation'])) {
                if ($this->conf['salutation'] === 'informal') {
                    $this->suffixesToTry[] = '_informal';
                }
                $this->suffixesToTry[] = '_formal';
            }
            $this->suffixesToTry[] = '';
        }

        return $this->suffixesToTry;
    }
1199941
public function getRegexes() : array
    {
        return [
            $this->getPhoneNumbers(),                        
            $this->getUrls(),            
            $this->getEmoticons(),            
            $this->getHashTags(),           
            $this->getAsciiArrows(),            
            $this->getUsernames(),
            $this->getHashTags(),            
            $this->getWordsWith(),
            $this->getNumbers(),            
            $this->getWordsWithout(),            
            $this->getEllipsisDots(),            
            $this->getEverythingElse()
        ];
    }
801469
public function getTranslations(): array
    {
        // Get english name
        $name = [
            'eng' => [
                'common' => $this->getName(),
                'official' => $this->getOfficialName(),
            ],
        ];

        // Get native names
        $natives = $this->getNativeNames() ?: [];

        // Get other translations
        $file = __DIR__.'/../resources/translations/'.mb_strtolower($this->getIsoAlpha2()).'.json';
        $translations = file_exists($file) ? json_decode(file_get_contents($file), true) : [];

        // Merge all names together
        $result = array_merge($translations, $natives, $name);

        // Sort alphabetically
        ksort($result);

        return $result;
    }
48969
public function getLabeledColumns()
    {
        if (!$this->model->hasMeta('labeledColumns')) {
            $orderedCols = $this->model->getItemsOrdered();

            $results = array();
            foreach ($orderedCols as $name) {
                if ($this->model->has($name, 'label')) {
                    $results[] = $name;
                }
            }

            $this->model->setMeta('labeledColumns', $results);
        }

        return $this->model->getMeta('labeledColumns');
    }
625910
public static function getList()
    {
        return [
            static::CHOICE,
            static::CLOZE,
            static::GRAPHIC,
            static::MATCH,
            static::PAIR,
            static::SET,
            static::WORDS,
            static::OPEN,
            static::SELECTION,
            static::GRID,
            static::CONTENT,
            static::ORDERING,
            static::BOOLEAN,
        ];
    }
376609
public function getPrefixes()
    {
        $prefixes = array();
        foreach (Mage::helper('ecomdev_varnish')->getAllowedPages() as $name => $label) {
            $prefixes[] = array(
                'field' => $name.'_',
                'label' => $label
            );
        }

        return $prefixes;
    }
101852
protected function getFlags()
    {
        $ignore = '';
        if (count($this->ignore)) {
            $ignore = ' --ignore=' . implode(',', $this->ignore);
        }

        if (strpos($this->standard, '/') !== false) {
            $standard = ' --standard='.$this->directory.$this->standard;
        } else {
            $standard = ' --standard='.$this->standard;
        }

        $suffixes = '';
        if (count($this->suffixes)) {
            $suffixes = ' --extensions=' . implode(',', $this->suffixes);
        }

        return array($ignore, $standard, $suffixes);
    }
83940
public function getAllIndexNames()
    {
        $indexes = [];
        foreach ($this->getClassesAndAnnotations() as $configuration) {
            /** @var Indexable $configuration */
            $indexes[$configuration->indexName] = $configuration->indexName;
        }

        return array_keys($indexes);
    }
410021
public function getLanguages()
    {
        if (null !== $this->languages) {
            return $this->languages;
        }

        $languages = $this->headers->getParameterListAsObject('Accept-Language');
        //@TODO convert comma seperated list to Array
        $this->languages = [];

        foreach (array_keys($languages) as $lang) {
            if (strstr($lang, '-')) {
                $codes = explode('-', $lang);
                if ($codes[0] == 'i') {
                    // Language not listed in ISO 639 that are not variants
                    // of any listed language, which can be registered with the
                    // i-prefix, such as i-cherokee
                    if (count($codes) > 1) {
                        $lang = $codes[1];
                    }
                } else {
                    for ($i = 0, $max = count($codes); $i < $max; $i++) {
                        if ($i == 0) {
                            $lang = strtolower($codes[0]);
                        } else {
                            $lang .= '_' . strtoupper($codes[$i]);
                        }
                    }
                }
            }

            $this->languages[] = $lang;
        }

        return $this->languages;
    }
790465
public List<SequenceLabel> getNumericNames() {
    final List<SequenceLabel> result = new ArrayList<SequenceLabel>();
    while (hasNextToken()) {
      result.add(getNextToken());
    }
    return result;
  }
1127529
public function getClassesAndAnnotations()
    {
        static $classesAndAnnotations;
        if ($classesAndAnnotations === null) {
            $classesAndAnnotations = [];
            foreach (array_keys($this->indexAnnotations) as $className) {
                $classesAndAnnotations[$className] = $this->indexAnnotations[$className]['annotation'];
            }
        }

        return $classesAndAnnotations;
    }
280171
public static function getLanguageOptions()
    {
        $languages = array();

        foreach (self::$languages as $language) {
            $strings = array();
            require(PHPCI_DIR . 'PHPCI/Languages/lang.' . $language . '.php');
            $languages[$language] = $strings['language_name'];
        }

        return $languages;
    }
325077
public function objLabels()
    {
        if ($this->objLabels === null) {
            $objLabels = [];
            $proto = $this->proto();
            $objMetadata = $proto->metadata();
            if (isset($objMetadata['labels']) && !empty($objMetadata['labels'])) {
                $objLabels = $objMetadata['labels'];
                array_walk($objLabels, function(&$value) {
                    $value = $this->translator()->translation($value);
                });
                $this->objLabels = $objLabels;
            }
        }

        return $this->objLabels;
    }
399197
protected function getClassNameOptions()
    {
        $hidden  = [];
        $classes = [];
        
        foreach ($this->dbObject('ClassName')->enumValues() as $class) {
            
            if ($class == self::class || !in_array($class, ClassInfo::subclassesFor($this))) {
                continue;
            }
            
            if ($hide = Config::inst()->get($class, 'hide_ancestor')) {
                $hidden[$hide] = true;
            }
            
            if (!$class::singleton()->canCreate()) {
                continue;
            }
            
            $classes[$class] = $class::singleton()->i18n_singular_name();
            
        }
        
        foreach ($hidden as $class => $hide) {
            unset($classes[$class]);
        }
        
        return $classes;
    }
487333
protected function getPrefixes()
    {
        $prefixes = $this->options['prefixes'];
        if ($prefixes) {
            return $prefixes;
        }

        return self::$standardizedPrefixes[$this->getMode()];
    }
1119965
public String[] getTags() {
		for (int i = 0; i < length; i++)
			localeStrings[i] = locales[i].getDisplayName();

		return localeStrings;
	}
397530
public function getNames(): array
    {
        $enumeration = $this->enumeration;
        $names       = [];
        foreach ($this->getOrdinals() as $ord) {
            $names[] = $enumeration::byOrdinal($ord)->getName();
        }
        return $names;
    }