任何地方 / 包装器
用于与OAAS Anywhere一起使用的包装器类和库
0.2.0
2020-03-10 14:22 UTC
This package is auto-updated.
Last update: 2024-09-14 07:20:51 UTC
README
基于PHP的Anywhere客户端
通过执行composer命令添加此库: composer require anywhere/wrapper
或将此库添加到您的composer.json文件中
"require": {
"anywhere/wrapper": "0.2.0"
}
自版本0.2.0起,为了保持库的大小和相关性,已取消对floor的支持
Anywrapper 使用方法
PDF请求示例
始终为您的请求URL选择POST。因为GET无需使用此库即可工作。
$pdf = new wrapper\anywhere\Pdf(Wrapper::POST); $pdf->setValue('Name', 'Someone'); $pdf->setValue('Age', '22'); $pdf->Send(API_URL, false);
Email请求示例
始终为您的请求URL选择POST。
$mail = new AnywhereMail(Wrapper::POST); $mail->setTo('example@gmail.com'); $mail->setCc('example@outlook.com'); $mail->setBcc('example@yahoo.co.id'); $mail->setSubject('Anywhere Wrapper'); $mail->setValue('Name', 'Anywhere'); $mail->setValue('Age', '22'); $mail->setAttachment('qrcode.png', 'https://anywhere.cf/qr/render?data=admin@example.co.id'); $mail->setAttachment('qrcode1.png', 'https://anywhere.cf/qr/render?data=developer@example.co.id'); $mail->Send(API_URL, false);
图像请求示例
$images = new \wrapper\anywhere\Image(); $images->setImageContentUrl('http://anywhere.test/qr/render?data=05b810384abc26a2365e1108501534a2&size=300&label=Anywhere'); $images->Send("http://anywhere.test/images/render/4f1bf2f1a5546d2d567043d14f1a14ae/1");
额外内容
来自印度尼西亚班达尔的爱心制作。