alcamo/rdf-literal 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

alcamo/rdf-literal

最新稳定版本:0.1.7

Composer 安装命令:

composer require alcamo/rdf-literal

包简介

RDF literals

README 文档

README

use alcamo\rdf_literal\LiteralFactory;

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

$factory = new LiteralFactory();

$number = $factory->create(1970);

echo $number . PHP_EOL;

echo $number->getDatatypeUri() . PHP_EOL;

$year = $factory->create(1970, LiteralFactory::XSD_NS . 'gYear');

echo $year . PHP_EOL;

echo $year->getDatatypeUri() . PHP_EOL;

echo "Literals are "
    . ($year->equals($number) ? '' : 'not')
    . ' equal' . PHP_EOL;

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

1970
http://www.w3.org/2001/XMLSchema#integer
1970
http://www.w3.org/2001/XMLSchema#gYear
Literals are not equal

Overview

The classes that implement LiteralInterface represent the concept of RDF Literals, i.e. data elements that have a datataype and may have a language tag.

Among others, this allows to:

  • Create values of various types from strings, governed by an XSD datatype URI.
  • Add a __toString() function to values which are not stringable.
  • Add a custom __toString() function which differs from the default representation of a value.
  • Distinguish values that may be represented the same way in PHP but have different meanings.

See the doxygen documentation for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2026-04-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固