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__ . '/../../'; if ($filename !== null) { $files = array($filename); } else { $files = array("{$configPath}phpword.ini", "{$configPath}phpword.ini.dist"); } foreach ($files as $file) { if (file_exists($file)) { $configFile = realpath($file); break; } } // Parse config file $config = array(); if ($configFile !== null) { $config = @parse_ini_file($configFile); if ($config === false) { return $config; } } // 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(); } }