| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Old Sites/ict/wp-content/plugins/smart-slider-3/Nextend/Framework/Font/ |
Upload File : |
<?php
namespace Nextend\Framework\Font;
use Nextend\Framework\Filesystem\Filesystem;
class FontSources {
/** @var AbstractFontSource[] */
private static $fontSources = array();
public function __construct() {
$dir = dirname(__FILE__) . '/Sources/';
foreach (Filesystem::folders($dir) as $folder) {
$file = $dir . $folder . '/' . $folder . '.php';
if (Filesystem::fileexists($file)) {
require_once($file);
}
}
}
/**
* @param string $class
*/
public static function registerSource($class) {
/** @var AbstractFontSource $source */
$source = new $class();
self::$fontSources[$source->getName()] = $source;
}
/**
* @return AbstractFontSource[]
*/
public static function getFontSources() {
return self::$fontSources;
}
public static function onFontManagerLoad($force = false) {
foreach (self::$fontSources as $source) {
$source->onFontManagerLoad($force);
}
}
public static function onFontManagerLoadBackend() {
foreach (self::$fontSources as $source) {
$source->onFontManagerLoadBackend();
}
}
}
new FontSources();