PluginProbe
E2Pdf – Export Pdf Tool for WordPress / 1.01.01
E2Pdf – Export Pdf Tool for WordPress v1.01.01
1.32.49 1.32.48 1.32.43 1.32.40 1.32.34 1.32.32 1.32.31 1.32.26 1.32.22 1.32.23 1.32.18 1.32.17 1.32.15 trunk 1.00.00 1.00.13 1.01.01 1.02.02 1.03.07 1.04.07 1.05.03 1.06.02 1.07.11 1.08.00 1.08.06 All 72 releases
e2pdf / classes / helper / e2pdf-xml.php

e2pdf-xml.php in E2Pdf – Export Pdf Tool for WordPress 1.01.01, at classes/helper/e2pdf-xml.php

55 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * E2pdf Zip Helper
5 *
6 * @copyright Copyright 2017 https://e2pdf.com
7 * @license GPL v2
8 * @version 1
9 * @link https://e2pdf.com
10 * @since 0.00.01
11 */
12 if (!defined('ABSPATH')) {
13 die('Access denied.');
14 }
15
16 class Helper_E2pdf_Xml {
17
18 private $xml = null;
19
20 /**
21 * Check if extension simplexml available
22 *
23 * @return bool
24 */
25 public function check() {
26 if (extension_loaded('simplexml')) {
27 return true;
28 } else {
29 return false;
30 }
31 }
32
33 /**
34 * Create new XML
35 *
36 * @param string $key - Wrapper of XML
37 *
38 * @return object - XML Object
39 */
40 public function create($key = false) {
41 $this->xml = new Helper_E2pdf_SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><' . $key . '></' . $key . '>');
42 return $this->xml;
43 }
44
45 /**
46 * Get XML file in Base64
47 *
48 * @return string
49 */
50 public function get_xml() {
51 return base64_encode($this->xml->asXML());
52 }
53
54 }
55