Fenos\Notifynder\Translator\TranslatorManager::getTranslations PHP Method

getTranslations() public method

Get translations.
public getTranslations ( ) : array | mixed
return array | mixed
    public function getTranslations()
    {
        // File cached path
        $filePath = $this->compiler->getFilePath();
        // If the file exists
        if (file_exists($filePath)) {
            // Check if is not expired
            if (!$this->compiler->isExpired()) {
                // Return the cached file in
                // an array
                return json_decode(file_get_contents($filePath));
            }
        }
        return $this->cacheFromConfig();
    }