ui-awesome / model
Typed model mapping for modern PHP applications.
Installs: 326
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ui-awesome/model
Requires
- php: ^8.1
- ext-mbstring: *
Requires (Dev)
- maglnet/composer-require-checker: ^4.7
- phpunit/phpunit: ^10.5
- roave/infection-static-analysis-plugin: ^1.34
- symplify/easy-coding-standard: ^12.1
- vimeo/psalm: ^5.22
This package is auto-updated.
Last update: 2026-03-01 01:51:46 UTC
README
UIAwesome Model for PHP
Typed model mapping for modern PHP applications
Nested properties, controlled casting, timestamp attributes, and array serialization
Features
Installation
composer require ui-awesome/model:^0.2
Quick start
<?php declare(strict_types=1); namespace App\Model; use UIAwesome\Model\AbstractModel; use UIAwesome\Model\Attribute\Timestamp; final class User extends AbstractModel { public string $name = ''; public string $email = ''; #[Timestamp] private int $updatedAt = 0; } $model = new User(); $model->load( [ 'User' => [ 'name' => 'Ada Lovelace', 'email' => 'ada@example.com', ], ], ); $model->setPropertyValue('name', 'Ada'); $types = $model->getPropertyTypes(); $payload = $model->toArray(snakeCase: true, exceptProperties: ['updatedAt']);
Documentation
For detailed configuration options and advanced usage.
- ๐ Installation Guide
- โ๏ธ Configuration Reference
- ๐ก Usage Examples
- ๐งช Testing Guide
- ๐ ๏ธ Development Guide
- ๐ Upgrade Guide