2014-03-13 00:17:48 -06:00
|
|
|
<?php
|
|
|
|
|
/**
|
2014-03-26 16:33:20 +07:00
|
|
|
* 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
|
|
|
*/
|
|
|
|
|
|
2014-03-22 10:06:08 +04:00
|
|
|
namespace PhpOffice\PhpWord;
|
|
|
|
|
|
2014-03-24 00:26:10 +07:00
|
|
|
/**
|
|
|
|
|
* Settings
|
|
|
|
|
*/
|
2014-03-22 10:06:08 +04:00
|
|
|
class Settings
|
2014-03-13 20:58:24 +07:00
|
|
|
{
|
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
|
|
|
|
|
*/
|
2014-03-13 20:58:24 +07:00
|
|
|
public static function setCompatibility($compatibility)
|
|
|
|
|
{
|
2014-03-13 00:17:48 -06:00
|
|
|
if (is_bool($compatibility)) {
|
|
|
|
|
self::$_xmlWriterCompatibility = $compatibility;
|
2014-03-13 20:58:24 +07:00
|
|
|
return true;
|
2014-03-13 00:17:48 -06:00
|
|
|
}
|
2014-03-13 20:58:24 +07:00
|
|
|
return false;
|
2014-03-15 09:27:48 -04:00
|
|
|
}
|
2014-03-13 00:17:48 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Return the compatibility option used by the XMLWriter
|
|
|
|
|
*
|
|
|
|
|
* @return boolean Compatibility
|
|
|
|
|
*/
|
2014-03-13 20:58:24 +07:00
|
|
|
public static function getCompatibility()
|
|
|
|
|
{
|
2014-03-13 00:17:48 -06:00
|
|
|
return self::$_xmlWriterCompatibility;
|
2014-03-15 09:27:48 -04:00
|
|
|
}
|
2014-03-23 17:37:26 +07:00
|
|
|
}
|