0) { self::$defaultFontSize = $value; return true; } return false; } /** * Load setting from phpword.yml or phpword.yml.dist * * @param string $filename * @return array */ public static function loadConfig($filename = null) { // Get config file $configFile = null; $configPath = __DIR__ . '/../../'; $files = array($filename, "{$configPath}phpword.yml", "{$configPath}phpword.yml.dist"); foreach ($files as $file) { if (file_exists($file)) { $configFile = realpath($file); break; } } // Use Spyc to load config file $config = array(); $spycLibrary = realpath(__DIR__ . '/Shared/Spyc/Spyc.php'); if (file_exists($spycLibrary) && $configFile !== null) { require_once $spycLibrary; $config = spyc_load_file($configFile); } // Set config value foreach ($config as $key => $value) { $method = "set{$key}"; if (method_exists(__CLASS__, $method)) { self::$method($value); } } return $config; } /** * Return the compatibility option used by the XMLWriter * * @deprecated 0.10.0 * @codeCoverageIgnore */ public static function getCompatibility() { return self::hasCompatibility(); } }