Get an array of device interface jabber states

@see $JABBER_STATES
@param boolean $translate If true, return the string representation
@return array An array of interface jabber states
344526
public function jabberStates($translate = false) {
        $states = $this->getSNMP()->subOidWalk(self::OID_JABBER_STATE, 12);

        if (!$translate)
            return $states;

        return $this->getSNMP()->translate($states, self::$JABBER_STATES);
    }
356862
public function getTranslations(
        array $domains = [],
        array $languages = [],
        callable $filter = null
    ) : array {
        return $this
            ->repositoryCollection
            ->getTranslations(
                $domains,
                $languages,
                $filter
            );
    }
203062
public function getTranslations($reload = false)
    {
        if ($this->translations && ! $reload) {
            return $this->translations;
        }

        collect($this->disk->allFiles($this->languageFilesPath))
            ->filter(function ($file) {
                return $this->disk->extension($file) == 'json';
            })
            ->each(function ($file) {
                $this->translations[str_replace('.json', '', $file->getFilename())]
                    = json_decode($file->getContents());
            });

        return $this->translations;
    }
801187
public function ifLoopbackModeFlags( $translate = false )
    {
        $states = $this->getSNMP()->walk1d( self::OID_VLAN_IF_LOOPBACK_MODE_FLAG );

        if( !$translate )
            return $states;

        return $this->getSNMP()->translate( $states, self::$IF_VLAN_LOOPBACK_MODE_FLAGS );
    }
111314
public function getTranslationsFromFiles($domain, $path, array $directories = [])
    {
        if (!$directories) {
            $directories = [
                $path . 'Resources' . DIRECTORY_SEPARATOR . 'translations',
                $this->kernelRoot . DIRECTORY_SEPARATOR . 'Resources' . DIRECTORY_SEPARATOR . $domain . DIRECTORY_SEPARATOR . 'translations',
            ];
        }

        $finder = new Finder();
        $translations = [];

        foreach ($directories as $directory) {
            if (is_dir($directory)) {
                $finder->files()
                    ->name($this->getFileNamePattern())
                    ->in($directory);

                foreach ($finder as $file) {
                    $translations = array_replace_recursive($this->getFileTranslationMessages($file, $domain), $translations);
                }
            }
        }

        return $translations;
    }
1273167
public function get($language)
    {
        $result = array();
        if (isset($this->{$language})) {
            $result = $this->{$language};
        }
        if ($language !== 'nl' && isset($this->nl)) {
            $result += $this->nl;
        }
        return $result;
    }
419378
public static function getBooleanStrings(bool $state = null): array
    {
        $strings = [
            false => ['', '0', 'false', 'no', 'off'],
            true => ['1', 'true', 'yes', 'on']
        ];
        
        return isset($state) ? $strings[$state] : array_merge($strings[false], $strings[true]);
    }
1038248
public function routeDetails($translate = false) {
        $fetchList = [
            'routeDest' => 'destination',
            'routeMask' => 'mask',
            'routeTos' => 'TOS',
            'routeNextHop' => 'nextHop',
            'routeIfIndex' => 'ifIndex',
            'routeType' => 'type',
            'routeProto' => 'protocol',
            'routeAge' => 'age',
            'routeInfo' => 'info',
            'routeNextHopAS' => 'nextHopAS',
            'routeMetric1' => 'metric1',
            'routeMetric2' => 'metric2',
            'routeMetric3' => 'metric3',
            'routeMetric4' => 'metric4',
            'routeMetric5' => 'metric5',
            'routeStatus' => 'status'
        ];
        $canTranslate = [ 'routeType', 'routeProto', 'routeStatus'];
        $details = [];

        foreach ($fetchList as $fn => $idx) {
            if (in_array($fn, $canTranslate))
                $values = $this->$fn($translate);
            else
                $values = $this->$fn();
            foreach ($values as $ip => $value)
                $details[$ip][$idx] = $value;
        }
        return $details;
    }
253171
protected function readTranslation($index)
    {
        $msgStr = $this->readStringFromTable($index, $this->msgStrTable);
        if (false === $msgStr) {
            $msgStr = array();
        }

        return $msgStr;
    }
1224388
public function getArray(bool $clean_keyboard = true) : array
    {
        if (empty($this->inline_keyboard)) {
            throw new BotException("Inline keyboard is empty");
        }

        // Create a new array to put the buttons
        $reply_markup = ['inline_keyboard' => $this->inline_keyboard];

        if ($clean_keyboard) {
            $this->clearKeyboard();
        }

        return $reply_markup;
    }
836777
protected function installKeysAndTranslations(array $translations)
    {
        $results = [];
        foreach ($translations as $keyName => $data) {
            $results[$keyName]['created'] = false;
            if (!$this->glossaryFacade->hasKey($keyName)) {
                $this->glossaryFacade->createKey($keyName);
                $results[$keyName]['created'] = true;
            }

            foreach ($data['translations'] as $localeName => $text) {
                $results[$keyName]['translation'][$localeName] = $this->addTranslation($localeName, $keyName, $text);
            }
        }

        return $results;
    }
927219
public function getJavaScriptCode()
    {
        $realTranslations = [];
        $translationsBinding = [];

        foreach ($this->translations as $key => $value) {
            $hash = HashService::get()->getHash($value);
            $realTranslations[$hash] = $value;
            $translationsBinding[$key] = $hash;
        }

        $jsonRealTranslations = $this->handleRealTranslations(ArrayService::get()->arrayToJavaScriptJson($realTranslations));
        $jsonTranslationsBinding = $this->handleTranslationsBinding(ArrayService::get()->arrayToJavaScriptJson($translationsBinding));

        return <<<JS
Fz.Localization.addLocalization($jsonRealTranslations, $jsonTranslationsBinding);
JS;
    }
150272
private function translationToString(Translation $translation)
    {
        $values = $translation->values;
        if ($translation instanceof Translation\Plural) {
            if (current($values) === 1) {
                return $translation->singular;
            } else {
                return $translation->plural;
            }
        } else {
            return $translation->message;
        }
    }
8404
public function getDeviceStates()
    {
        $uri = 'deviceStates';
        $response = $this->client->getEndpoint()->get($uri);

        $deviceStates = [];
        foreach (\GuzzleHttp\json_decode($response->getBody()) as $deviceState) {
            $deviceStates[] = new DeviceState($this->client, $deviceState);
        }

        return $deviceStates;
    }
1238035
public function convertTranslationsToString(Translations $translations)
    {
        \Gettext\Generators\Mo::$includeEmptyTranslations = true;

        return $translations->toMoString();
    }
541513
public function transFormErrors($formErrorList, $translationDomain)
    {
        $ret = [];
        foreach ($formErrorList as $k => $formError) {
            $ret[$k] = $this->translator->trans($formError->getMessage(), $formError->getMessageParameters(), $translationDomain);
        }
        return $ret;
    }
425526
public function types($translate = false) {
        $types = $this->getSNMP()->subOidWalk(self::OID_TYPE, 12);

        if (!$translate)
            return $types;

        return $this->getSNMP()->translate($types, self::$TYPES);
    }