CreateSettings.inc 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?php
  2. /**
  3. * Create default settings
  4. *
  5. * @category Phpdocx
  6. * @package elements
  7. * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L.
  8. * (http://www.2mdc.com)
  9. * @license LGPL
  10. * @version 1.0
  11. * @link http://www.phpdocx.com
  12. * @since File available since Release 1.0
  13. */
  14. include_once dirname(__FILE__) . '/CreateElement.inc';
  15. /**
  16. * Create default settings
  17. *
  18. * @category Phpdocx
  19. * @package elements
  20. * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L.
  21. * (http://www.2mdc.com)
  22. * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
  23. * @version 1.0
  24. * @link http://www.phpdocx.com
  25. * @since Class available since Release 1.0
  26. */
  27. class CreateSettings extends CreateElement
  28. {
  29. /**
  30. *
  31. * @access protected
  32. */
  33. protected $_xml;
  34. /**
  35. *
  36. * @access private
  37. * @static
  38. */
  39. private static $_instance = NULL;
  40. /**
  41. * Construct
  42. *
  43. * @access public
  44. */
  45. public function __construct()
  46. {
  47. }
  48. /**
  49. * Destruct
  50. *
  51. * @access public
  52. */
  53. public function __destruct()
  54. {
  55. }
  56. /**
  57. * Magic method, returns current XML
  58. *
  59. * @access public
  60. * @return string Return current XML
  61. */
  62. public function __toString()
  63. {
  64. return $this->_xml;
  65. }
  66. /**
  67. * Singleton, return instance of class
  68. *
  69. * @access public
  70. * @return CreateLink
  71. */
  72. public static function getInstance()
  73. {
  74. if (self::$_instance == NULL) {
  75. self::$_instance = new CreateSettings();
  76. }
  77. return self::$_instance;
  78. }
  79. /**
  80. * Generate settings
  81. */
  82. public function generateSettings()
  83. {
  84. $this->_xml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'
  85. . '<w:settings xmlns:o="urn:schemas-microsoft-com:office:offi'
  86. . 'ce" xmlns:r="http://schemas.openxmlformats.org/officeDocume'
  87. . 'nt/2006/relationships" xmlns:m="http://schemas.openxmlfor'
  88. . 'mats.org/officeDocument/2006/math" xmlns:v="urn:schemas-'
  89. . 'microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:'
  90. . 'office:word" xmlns:w="http://schemas.openxmlformats.org/'
  91. . 'wordprocessingml/2006/main" xmlns:sl="http://schemas.'
  92. . 'openxmlformats.org/schemaLibrary/2006/main"><w:zoom w:'
  93. . 'percent="100"/><w:proofState w:grammar="clean"/>'
  94. . '<w:defaultTabStop w:val="708"/><w:hyphenationZone w:val='
  95. . '"425"/><w:characterSpacingControl w:val="doNotCompress"/>'
  96. . '<w:compat/><w:rsids><w:rsidRoot w:val="00A84D90"/><w:rsid '
  97. . 'w:val="00A84D90"/><w:rsid w:val="00BD6F4D"/></w:rsids>'
  98. . '<m:mathPr><m:mathFont m:val="Cambria Math"/><m:brkBin '
  99. . 'm:val="before"/><m:brkBinSub m:val="--"/><m:smallFrac '
  100. . 'm:val="off"/><m:dispDef/><m:lMargin m:val="0"/><m:rMargin '
  101. . 'm:val="0"/><m:defJc m:val="centerGroup"/><m:wrapIndent '
  102. . 'm:val="1440"/><m:intLim m:val="subSup"/><m:naryLim '
  103. . 'm:val="undOvr"/></m:mathPr><w:themeFontLang w:val="es-ES"/>'
  104. . '<w:clrSchemeMapping w:bg1="light1" w:t1="dark1" '
  105. . 'w:bg2="light2" w:t2="dark2" w:accent1="accent1" w:accent2='
  106. . '"accent2" w:accent3="accent3" w:accent4="accent4" w:accent5='
  107. . '"accent5" w:accent6="accent6" w:hyperlink="hyperlink" '
  108. . 'w:followedHyperlink="followedHyperlink"/><w:shapeDefaults>'
  109. . '<o:shapedefaults v:ext="edit" spidmax="2050"/>'
  110. . '<o:shapelayout v:ext="edit"><o:idmap v:ext="edit" data="1"/>'
  111. . '</o:shapelayout></w:shapeDefaults><w:decimalSymbol'
  112. . ' w:val=","/><w:listSeparator w:val=";"/></w:settings>';
  113. }
  114. }