gubler/uuid-encoder-bundle
Composer 安装命令:
composer require gubler/uuid-encoder-bundle
包简介
This bundle provides Symfony integration for gubler/uuid-encoder.
README 文档
README
This bundle provides Symfony integration for gubler/uuid-encoder with some helper utilities and twig extensions.
This autowires/autoconfigures the following classes:
UuidEncoderUrlUuidEncoderFilesystemUuidEncoder
Each has default character sets (which characters are used to encode the UUID). UrlUuidEncoder and FilesystemUuidEncoder are wrappers around UuidEncoder that define a default character set.
You can configure the character set for each class by updating the config/packages/gubler_uuid_encoder.yaml file (shown here with defaults:
gubler_uuid_encoder: charset: default: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 url: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_~. filesystem: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
You can also use the following Twig extensions for encoding UUIDs in your templates:
{# data.id is a UUID #} Encoded UUID with UuidEncoder is {{ data.id|uuidEncoder }} Encoded UUID with UrlUuidEncoder is {{ data.id|urlUuid }} Encoded UUID with FilesystemUuidEncoder is {{ data.id|filesystemUuid }}
统计信息
- 总下载量: 54
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-02-14