Download the PHP package thewildfields/tavriia without Composer
On this page you can find all versions of the php package thewildfields/tavriia. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thewildfields/tavriia
More information about thewildfields/tavriia
Files in thewildfields/tavriia
Package tavriia
Short Description A reusable PHP framework providing a clean, typed, PSR-compliant OOP abstraction layer over WordPress core functions.
License MIT
Informations about the package tavriia
Tavriia
A clean, typed, PSR-compliant OOP abstraction layer over WordPress core functions. Ships as a Composer package consumed by WordPress plugins.
What is Tavriia?
Tavriia is a framework that provides typed wrappers, contracts, and DTOs over raw WordPress APIs. It is not a plugin. It is a Composer library you pull into your plugin projects.
Without Tavriia:
With Tavriia:
Installation
Requires PHP 8.2+ and WordPress (no minimum version enforced).
Quick Start
1. Create a module
2. Create posts with typed DTOs
3. Query posts fluently
4. Make HTTP requests
Features
| Area | Classes | Wraps |
|---|---|---|
| Posts | PostFactory, PostRepository, MetaManager |
wp_insert_post, wp_update_post, get_post, get_post_meta |
| Taxonomy | TermFactory, TermRepository, TermMetaManager |
wp_insert_term, get_terms, wp_get_object_terms |
| Queries | QueryBuilder, QueryResult |
WP_Query, get_posts |
| HTTP | HttpClient, RequestBuilder, ResponseProcessor |
wp_remote_get, wp_remote_post, wp_remote_request |
| REST | RestServer, RestRouteBuilder, RestResponse, AbstractRestController |
register_rest_route, WP_REST_Response, WP_Error |
| Admin | AdminMenuPage, AdminNotice |
add_menu_page, admin_notices |
| Modules | AbstractModule |
WordPress hooks lifecycle |
Design Principles
WP_Error never escapes the framework. Every wrapper converts WP_Error into a typed exception at the WordPress boundary. Plugin code never calls is_wp_error().
Factories return IDs, repositories return DTOs. PostFactory::create() returns int. PostRepository::findById() returns PostDTO or throws PostNotFoundException.
All concrete classes are final. Only AbstractModule and abstract base classes are non-final.
All DTOs are readonly. Immutable value objects with named constructors where appropriate.
Typed meta accessors. MetaManager::getString(), ::getInt(), ::getBool(), ::getArray() — never raw meta values.
Documentation
- Getting Started
- Core Concepts
- Modules
- Posts & Meta
- Taxonomy & Terms
- Query Builder
- HTTP Client
- REST API
- Admin Helpers
- Exception Handling
- API Reference
Contributing
This is a private framework package for The Wild Fields. See CLAUDE.md for architectural guidelines.
License
MIT