forked from typecho/typecho
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBase64.php
43 lines (40 loc) · 843 Bytes
/
Base64.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/*
IXR - The Inutio XML-RPC Library - (c) Incutio Ltd 2002
Version 1.61 - Simon Willison, 11th July 2003 (htmlentities -> htmlspecialchars)
Site: http://scripts.incutio.com/xmlrpc/
Manual: http://scripts.incutio.com/xmlrpc/manual.php
Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php
*/
/**
* IXR Base64编码
*
* @package IXR
*/
class IXR_Base64
{
/**
* 编码数据
*
* @var string
*/
private $data;
/**
* 初始化数据
*
* @param string $data
*/
public function __construct($data)
{
$this->data = $data;
}
/**
* 获取XML数据
*
* @return string
*/
public function getXml()
{
return '<base64>' . base64_encode($this->data) . '</base64>';
}
}