定制 waaseyaa/typed-data 二次开发

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

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

waaseyaa/typed-data

最新稳定版本:v0.1.0-alpha.179

Composer 安装命令:

composer require waaseyaa/typed-data

包简介

Type system with PHP-native facade for Waaseyaa

README 文档

README

Layer 0 — Foundation

Typed data validation and coercion for Waaseyaa applications.

Provides a type system for field and entity-adjacent values. EntityCastCoercion (Waaseyaa\TypedData\Coercion\EntityCastCoercion) is the canonical implementation for entity $casts builtins int, float, bool, string, and array (JSON string in storage): strict storage→domain and domain→storage rules shared with waaseyaa/entity ValueCaster (#1185). Failures throw CoercionException, which ValueCaster wraps as CastException for a single error model at the entity boundary.

CastTokenMapper maps entity cast tokens to TypedDataManager dataType strings (intinteger, etc.). Tokens array / json return null because JSON bags are not map/list without a schema.

Primitive types (IntegerData, FloatData, BooleanData, StringData) use getCastedValue() via the same coercion rules as entities (aligned with ValueCaster).

Symfony Validator applies DataDefinition constraints on the raw getValue() bag; coercion (EntityCastCoercion / getCastedValue) is separate from constraint validation—run both when you need normalized types and business rules.

Used by the field system (FieldItemBase, PropertyValue) and by entity casting (#1185).

Key classes: TypedDataInterface, DataDefinition, TypedDataManager, EntityCastCoercion, CastTokenMapper.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2026-03-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固