concrete/src/Localization/Translation/Local/Factory.php
protected function getMoFileStats($moFile)
    {
        if ($this->fs->isFile($moFile)) {
            $lastModifiedTimestamp = $this->fs->lastModified($moFile);
            if ($this->cache->isEnabled()) {
                $cacheItem = $this->cache->getItem(self::CACHE_PREFIX . '/' . md5($moFile) . '_' . $lastModifiedTimestamp);
            } else {
                $cacheItem = null;
            }
            if ($cacheItem === null || $cacheItem->isMiss()) {
                $stats = $this->getTranslationsStats(Translations::fromMoFile($moFile), new DateTime('@' . $lastModifiedTimestamp));
                if ($cacheItem !== null) {
                    $cacheItem->set($stats)->expiresAfter(self::CACHE_DURATION)->save();
                }
            } else {
                $stats = $cacheItem->get();
            }
        } else {
            $stats = null;
        }

        return new Stats('mo', $moFile, ($stats === null) ? '' : $stats['version'], ($stats === null) ? null : $stats['updatedOn']);
    }
protected function getMoFileStats($moFile)
    {
        if ($this->fs->isFile($moFile)) {
            $lastModifiedTimestamp = $this->fs->lastModified($moFile);
            if ($this->cache->isEnabled()) {
                $cacheItem = $this->cache->getItem(self::CACHE_PREFIX . '/' . md5($moFile) . '_' . $lastModifiedTimestamp);
            } else {
                $cacheItem = null;
            }
            if ($cacheItem === null || $cacheItem->isMiss()) {
                $stats = $this->getTranslationsStats(Translations::fromMoFile($moFile), new DateTime('@' . $lastModifiedTimestamp));
                if ($cacheItem !== null) {
                    $cacheItem->set($stats)->expiresAfter(self::CACHE_DURATION)->save();
                }
            } else {
                $stats = $cacheItem->get();
            }
        } else {
            $stats = null;
        }

        return new Stats('mo', $moFile, ($stats === null) ? '' : $stats['version'], ($stats === null) ? null : $stats['updatedOn']);
    }
protected function getMoFileStats ( $ moFile ) { if ( $ this -> fs -> isFile ( $ moFile ) ) { $ lastModifiedTimestamp = $ this -> fs -> lastModified ( $ moFile ) ; if ( $ this -> cache -> isEnabled ( ) ) { $ cacheItem = $ this -> cache -> getItem ( self :: CACHE_PREFIX . '/' . md5 ( $ moFile ) . '_' . $ lastModifiedTimestamp ) ; } else { $ cacheItem = null ; } if ( $ cacheItem === null || $ cacheItem -> isMiss ( ) ) { $ stats = $ this -> getTranslationsStats ( Translations :: fromMoFile ( $ moFile ) , new DateTime ( '@' . $ lastModifiedTimestamp ) ) ; if ( $ cacheItem !== null ) { $ cacheItem -> set ( $ stats ) -> expiresAfter ( self :: CACHE_DURATION ) -> save ( ) ; } } else { $ stats = $ cacheItem -> get ( ) ; } } else { $ stats = null ; } return new Stats ( 'mo' , $ moFile , ( $ stats === null ) ? '' : $ stats [ 'version' ] , ( $ stats === null ) ? null : $ stats [ 'updatedOn' ] ) ; }
Get stats for a gettext .mo file.

@param string $moFile The full path to a gettext .mo file (it may not exist)

@return Stats
Get stats for a gettext . mo file .