PHPWord/src/PhpWord/Settings.php

49 lines
1.1 KiB
PHP
Raw Normal View History

2014-03-13 00:17:48 -06:00
<?php
/**
* PHPWord
2014-03-13 00:17:48 -06:00
*
2014-03-27 23:55:06 +07:00
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
2014-03-13 00:17:48 -06:00
*/
namespace PhpOffice\PhpWord;
/**
* Settings
*/
class Settings
{
2014-03-13 00:17:48 -06:00
/**
* Compatibility option for XMLWriter
*
* @var boolean
*/
private static $_xmlWriterCompatibility = true;
/**
* Set the compatibility option used by the XMLWriter
*
* @param boolean $compatibility This sets the setIndent and setIndentString for better compatibility
* @return boolean Success or failure
*/
public static function setCompatibility($compatibility)
{
2014-03-13 00:17:48 -06:00
if (is_bool($compatibility)) {
self::$_xmlWriterCompatibility = $compatibility;
return true;
2014-03-13 00:17:48 -06:00
}
return false;
}
2014-03-13 00:17:48 -06:00
/**
* Return the compatibility option used by the XMLWriter
*
* @return boolean Compatibility
*/
public static function getCompatibility()
{
2014-03-13 00:17:48 -06:00
return self::$_xmlWriterCompatibility;
}
}