定制 alcamo/rdf-literal-serializer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

alcamo/rdf-literal-serializer

Composer 安装命令:

composer require alcamo/rdf-literal-serializer

包简介

(De)serialization of RDF literals

README 文档

README

namespace alcamo\rdf_literal_serializer;

use alcamo\rdf_literal\NonNegativeIntegerLiteral;

include $_composer_autoload_path ?? __DIR__ . '/../vendor/autoload.php';

$serializer = AbstractSerializer::createFromProps(
    [
        'class'       => NonNegativeIntegerSerializer::class,
        'encoding'    => 'EBCDIC',
        'lengthRange' => [ 6, null ]
    ]
);

$literal1 = new NonNegativeIntegerLiteral(123);

$serialization = $serializer->serialize($literal1);

echo "Hexdump of EBCDIC: " . bin2hex($serialization) . PHP_EOL;

$literal2 = $serializer->deserialize($serialization);

echo "Deserialized to: $literal2" . PHP_EOL;

This example is contained in this package as a file in the bin directory. It will output

Hexdump of EBCDIC: f0f0f0f1f2f3
Deserialized to: 123

The purpose of this package is to provide configurable (de)serialization of RDF literal objects (see alcamo/rdf-literal). Most serialization methods are rather trivial as such; the added value is the fact that the serialization parameters are completely configurable. As in the above example, in most cases at least the following are configurable:

  • The serializer class - the right class depends on the dataype of the literal.
  • The encoding.
  • The length of the output.

See the doxygen documentation for details.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2026-07-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固