jawira/plantuml-encoding

PlantUML 编码函数

v1.1.0 2022-05-31 18:58 UTC

This package is auto-updated.

Last update: 2024-08-29 04:31:30 UTC


README

此库公开了PlantUML 文本编码函数

  • encodep()
  • encode6bit()
  • append3bytes()
  • encode64()

ℹ️ 通常仅使用 encodep()

Packagist Version Packagist PHP Version Support Packagist Downloads Packagist License

用法

<?php
use function Jawira\PlantUml\encodep;

$diagram = <<<TXT
@startuml
Bob -> Alice : hello
@enduml
TXT;

$encode = encodep($diagram); // SyfFKj2rKt3CoKnELR1Io4ZDoSa70000

echo "https://www.plantuml.com/plantuml/uml/$encode";

输出: https://www.plantuml.com/plantuml/uml/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000

⚠️ 自v1.0.0版本起,encodep()函数期望接收UTF-8字符串。

安装

$ composer require jawira/plantuml-encoding

贡献

  • 如果你喜欢这个项目,在GitHub上⭐给它加星。 GitHub Repo stars
  • 或者在Twitter上关注我。 Twitter Follow

鸣谢

这些函数是从http://plantuml.com/code-php复制粘贴过来的。

jawira的软件包

jawira/plantuml GitHub stars
提供PlantUML可执行文件和plantuml.jar
jawira/case-converter GitHub stars
在13种命名规范之间转换字符串:Snake case,Camel case,Pascal case,Kebab case,Ada case,Train case,Cobol case,Macro case,Upper case,Lower case,Sentence case,Title case和Dot notation。
jawira/emoji-catalog GitHub stars
以类常量的形式获取对+3000个表情符号的访问权限。
更多...