Files
typecho/var/IXR/Base64.php
joyqi 4c8c64c79e Feat/code refactor (#1626)
* remove all magic methods, add type for class properties

* refactor codes

* fix all

* refactor code

* fix type

* fix all

* fix request is method

* fix all

* fix router

* fix get page
2023-09-24 16:21:32 +08:00

39 lines
516 B
PHP

<?php
namespace IXR;
/**
* IXR Base64编码
*
* @package IXR
*/
class Base64
{
/**
* 编码数据
*
* @var string
*/
private string $data;
/**
* 初始化数据
*
* @param string $data
*/
public function __construct(string $data)
{
$this->data = $data;
}
/**
* 获取XML数据
*
* @return string
*/
public function getXml()
{
return '<base64>' . base64_encode($this->data) . '</base64>';
}
}