xsl.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <?php
  2. // Start of xsl v.0.1
  3. /**
  4. * @link https://php.net/manual/en/class.xsltprocessor.php
  5. */
  6. class XSLTProcessor {
  7. /**
  8. * Import stylesheet
  9. * @link https://php.net/manual/en/xsltprocessor.importstylesheet.php
  10. * @param object $stylesheet <p>
  11. * The imported style sheet as a <b>DOMDocument</b> or
  12. * <b>SimpleXMLElement</b> object.
  13. * </p>
  14. * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
  15. */
  16. public function importStylesheet ($stylesheet) {}
  17. /**
  18. * Transform to a DOMDocument
  19. * @link https://php.net/manual/en/xsltprocessor.transformtodoc.php
  20. * @param DOMNode $doc <p>
  21. * The node to be transformed.
  22. * </p>
  23. * @return DOMDocument|false The resulting <b>DOMDocument</b> or <b>FALSE</b> on error.
  24. */
  25. public function transformToDoc (DOMNode $doc) {}
  26. /**
  27. * Transform to URI
  28. * @link https://php.net/manual/en/xsltprocessor.transformtouri.php
  29. * @param DOMDocument|SimpleXMLElement $doc <p>
  30. * The document to transform.
  31. * </p>
  32. * @param string $uri <p>
  33. * The target URI for the transformation.
  34. * </p>
  35. * @return int|false the number of bytes written or <b>FALSE</b> if an error occurred.
  36. */
  37. public function transformToUri ($doc, $uri) {}
  38. /**
  39. * Transform to XML
  40. * @link https://php.net/manual/en/xsltprocessor.transformtoxml.php
  41. * @param DOMDocument|SimpleXMLElement $doc <p>
  42. * The transformed document.
  43. * </p>
  44. * @return string|false The result of the transformation as a string or <b>FALSE</b> on error.
  45. */
  46. public function transformToXml ($doc) {}
  47. /**
  48. * Set value for a parameter
  49. * @link https://php.net/manual/en/xsltprocessor.setparameter.php
  50. * @param string $namespace <p>
  51. * The namespace URI of the XSLT parameter.
  52. * </p>
  53. * @param string $name <p>
  54. * The local name of the XSLT parameter.
  55. * </p>
  56. * @param string $value <p>
  57. * The new value of the XSLT parameter.
  58. * </p>
  59. * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
  60. */
  61. public function setParameter ($namespace, $name, $value) {}
  62. /**
  63. * Get value of a parameter
  64. * @link https://php.net/manual/en/xsltprocessor.getparameter.php
  65. * @param string $namespaceURI <p>
  66. * The namespace URI of the XSLT parameter.
  67. * </p>
  68. * @param string $localName <p>
  69. * The local name of the XSLT parameter.
  70. * </p>
  71. * @return string|false The value of the parameter (as a string), or <b>FALSE</b> if it's not set.
  72. */
  73. public function getParameter ($namespaceURI, $localName) {}
  74. /**
  75. * Remove parameter
  76. * @link https://php.net/manual/en/xsltprocessor.removeparameter.php
  77. * @param string $namespaceURI <p>
  78. * The namespace URI of the XSLT parameter.
  79. * </p>
  80. * @param string $localName <p>
  81. * The local name of the XSLT parameter.
  82. * </p>
  83. * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
  84. */
  85. public function removeParameter ($namespaceURI, $localName) {}
  86. /**
  87. * Determine if PHP has EXSLT support
  88. * @link https://php.net/manual/en/xsltprocessor.hasexsltsupport.php
  89. * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
  90. * @since 5.0.4
  91. */
  92. public function hasExsltSupport () {}
  93. /**
  94. * Enables the ability to use PHP functions as XSLT functions
  95. * @link https://php.net/manual/en/xsltprocessor.registerphpfunctions.php
  96. * @param mixed $restrict [optional] <p>
  97. * Use this parameter to only allow certain functions to be called from
  98. * XSLT.
  99. * </p>
  100. * <p>
  101. * This parameter can be either a string (a function name) or an array of
  102. * functions.
  103. * </p>
  104. * @return void No value is returned.
  105. * @since 5.0.4
  106. */
  107. public function registerPHPFunctions ($restrict = null) {}
  108. /**
  109. * Sets profiling output file
  110. * @link https://php.net/manual/en/xsltprocessor.setprofiling.php
  111. * @param string $filename <p>
  112. * Path to the file to dump profiling information.
  113. * </p>
  114. * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
  115. */
  116. public function setProfiling ($filename) {}
  117. /**
  118. * Set security preferences
  119. * @link https://php.net/manual/en/xsltprocessor.setsecurityprefs.php
  120. * @param int $securityPrefs
  121. * @return int
  122. * @since 5.4
  123. */
  124. public function setSecurityPrefs ($securityPrefs) {}
  125. /**
  126. * Get security preferences
  127. * @link https://php.net/manual/en/xsltprocessor.getsecurityprefs.php
  128. * @return int
  129. * @since 5.4
  130. */
  131. public function getSecurityPrefs () {}
  132. }
  133. define ('XSL_CLONE_AUTO', 0);
  134. define ('XSL_CLONE_NEVER', -1);
  135. define ('XSL_CLONE_ALWAYS', 1);
  136. /** @link https://php.net/manual/en/xsl.constants.php */
  137. define ('XSL_SECPREF_NONE', 0);
  138. /** @link https://php.net/manual/en/xsl.constants.php */
  139. define ('XSL_SECPREF_READ_FILE', 2);
  140. /** @link https://php.net/manual/en/xsl.constants.php */
  141. define ('XSL_SECPREF_WRITE_FILE', 4);
  142. /** @link https://php.net/manual/en/xsl.constants.php */
  143. define ('XSL_SECPREF_CREATE_DIRECTORY', 8);
  144. /** @link https://php.net/manual/en/xsl.constants.php */
  145. define ('XSL_SECPREF_READ_NETWORK', 16);
  146. /** @link https://php.net/manual/en/xsl.constants.php */
  147. define ('XSL_SECPREF_WRITE_NETWORK', 32);
  148. /** @link https://php.net/manual/en/xsl.constants.php */
  149. define ('XSL_SECPREF_DEFAULT', 44);
  150. /**
  151. * libxslt version like 10117. Available as of PHP 5.1.2.
  152. * @link https://php.net/manual/en/xsl.constants.php
  153. */
  154. define ('LIBXSLT_VERSION', 10128);
  155. /**
  156. * libxslt version like 1.1.17. Available as of PHP 5.1.2.
  157. * @link https://php.net/manual/en/xsl.constants.php
  158. */
  159. define ('LIBXSLT_DOTTED_VERSION', "1.1.28");
  160. /**
  161. * libexslt version like 813. Available as of PHP 5.1.2.
  162. * @link https://php.net/manual/en/xsl.constants.php
  163. */
  164. define ('LIBEXSLT_VERSION', 817);
  165. /**
  166. * libexslt version like 1.1.17. Available as of PHP 5.1.2.
  167. * @link https://php.net/manual/en/xsl.constants.php
  168. */
  169. define ('LIBEXSLT_DOTTED_VERSION', "1.1.28");
  170. // End of xsl v.0.1
  171. ?>