public function getContent(string $namespace, string $locale, string $name): string
    {
        $nKey = self::getNKey($namespace, $locale);

        // L1 read
        $content = $this->loadedData[$nKey][$name] ?? false;

        if (is_string($content)) {
            // L1 hit
            return $content;
        }

        // L2 read + L1 write
        $this->loadedData[$nKey] = $this->loadedData[$nKey] ?? $this->loadNspaceFromCache($namespace, $locale);

        $fallbackLocale = $this->config['fallback'] ?? '';
        $content = $this->loadedData[$nKey][$name] ?? false;

        if (is_string($content)) {
            return $content;
        }

        if ($fallbackLocale === false || $locale === $fallbackLocale) {
            return '';
        }

        return $this->getContent($namespace, $fallbackLocale, $name);
    }
public function getContent(string $namespace, string $locale, string $name): string
    {
        $nKey = self::getNKey($namespace, $locale);

        // L1 read
        $content = $this->loadedData[$nKey][$name] ?? false;

        if (is_string($content)) {
            // L1 hit
            return $content;
        }

        // L2 read + L1 write
        $this->loadedData[$nKey] = $this->loadedData[$nKey] ?? $this->loadNspaceFromCache($namespace, $locale);

        $fallbackLocale = $this->config['fallback'] ?? '';
        $content = $this->loadedData[$nKey][$name] ?? false;

        if (is_string($content)) {
            return $content;
        }

        if ($fallbackLocale === false || $locale === $fallbackLocale) {
            return '';
        }

        return $this->getContent($namespace, $fallbackLocale, $name);
    }
public function getContent ( string $ namespace , string $ locale , string $ name ) : string { $ nKey = self :: getNKey ( $ namespace , $ locale ) ; // L1 read $ content = $ this -> loadedData [ $ nKey ] [ $ name ] ?? false ; if ( is_string ( $ content ) ) { // L1 hit return $ content ; } // L2 read + L1 write $ this -> loadedData [ $ nKey ] = $ this -> loadedData [ $ nKey ] ?? $ this -> loadNspaceFromCache ( $ namespace , $ locale ) ; $ fallbackLocale = $ this -> config [ 'fallback' ] ?? '' ; $ content = $ this -> loadedData [ $ nKey ] [ $ name ] ?? false ; if ( is_string ( $ content ) ) { return $ content ; } if ( $ fallbackLocale === false || $ locale === $ fallbackLocale ) { return '' ; } return $ this -> getContent ( $ namespace , $ fallbackLocale , $ name ) ; }
L1 - PHP ARRAY LAYER

@param string $namespace
@param string $locale
@param string $name
@return string
L1 - PHP ARRAY LAYER