HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.30
System: Linux iZj6c1151k3ad370bosnmsZ 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64
User: root (0)
PHP: 7.4.30
Disabled: NONE
Upload Files
File: /var/www/html/somonline.org/wp-content/plugins/wpml-string-translation/classes/MO/File/Manager.php
<?php

namespace WPML\ST\MO\File;

use GlobIterator;
use WPML\Collect\Support\Collection;
use WPML\ST\TranslationFile\Domains;
use WPML\ST\TranslationFile\StringsRetrieve;
use WPML_Language_Records;

class Manager extends \WPML\ST\TranslationFile\Manager {

	public function __construct(
		StringsRetrieve $strings,
		Builder $builder,
		\WP_Filesystem_Direct $filesystem,
		WPML_Language_Records $language_records,
		Domains $domains
	) {
		parent::__construct( $strings, $builder, $filesystem, $language_records, $domains );
	}

	/**
	 * @return string
	 */
	protected function getFileExtension() {
		return 'mo';
	}

	/**
	 * @return bool
	 */
	public function isPartialFile() {
		return true;
	}

	/**
	 * @return Collection
	 */
	protected function getDomains() {
		return $this->domains->getMODomains();
	}

	/**
	 * @return bool
	 */
	public static function hasFiles() {
		return (bool) ( new GlobIterator( self::getSubdir() . '/*.mo' ) )->count();
	}
}