定制 devkussema/semantica-core 二次开发

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

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

devkussema/semantica-core

最新稳定版本:v1.0.0

Composer 安装命令:

composer require devkussema/semantica-core

包简介

Semantica Framework Core - Modern OOP PHP framework engine

README 文档

README

PHP Version License Version

The powerful core engine of Semantica Framework - A modern, object-oriented PHP framework inspired by Laravel's elegance and simplicity.

🎯 About

Semantica Core is the heart of the Semantica Framework, providing:

  • Modern OOP Architecture with dependency injection container
  • Flexible Database Management supporting multiple simultaneous connections (MySQL, PostgreSQL, SQLite)
  • Dynamic Template System with theme switching capabilities
  • HTTP Layer with modern Request/Response handling
  • Routing System with fluent API and named routes
  • CLI Infrastructure for command-line tools
  • Configuration Management with environment variable support

🏗️ Components

Core Classes

  • Application - Main application container and bootstrap
  • Container - Dependency injection container
  • ConfigManager - Configuration and environment handling

Database

  • DatabaseManager - Multi-connection database management
  • Support for MySQL, PostgreSQL, SQLite

HTTP & Routing

  • Request - HTTP request abstraction
  • Response - HTTP response with JSON support
  • Router - Modern routing with groups and middleware support
  • Route - Individual route with constraints and naming

Templates

  • TemplateManager - Dynamic theme system
  • Support for multiple themes and layouts
  • Variable injection and partial rendering

Console

  • CommandManager - CLI command registration and execution
  • CommandInterface - Interface for custom commands

🚀 Features

Multi-Database Support

$db = new DatabaseManager($config);

// Default connection
$users = $db->fetch("SELECT * FROM users");

// Specific connection
$products = $db->fetch("SELECT * FROM products", [], 'shop_db');

// Transactions
$db->beginTransaction();
$db->execute("INSERT INTO users (name) VALUES (?)", ['João']);
$db->commit();

Dynamic Templates

$template = new TemplateManager($basePath, $config);

// Switch themes dynamically
$template->setTheme('admin_v1');

// Render with layout
$html = $template->renderWithLayout('users.index', $data);

Modern Routing

$router = new Router();

// Named routes with constraints
$router->get('/users/{id}', 'UserController@show')
    ->name('users.show')
    ->where('id', '\d+');

// Route groups
$router->group(['prefix' => 'api'], function($router) {
    $router->get('/status', 'ApiController@status');
});

📦 Installation

This is the core package and should not be installed directly. Use the application skeleton instead:

composer create-project semantica/app my-project

For manual installation in existing projects:

composer require semantica/core

🔧 Requirements

  • PHP 8.0 or higher
  • PDO extension for database support
  • JSON extension

📖 Documentation

Full documentation is available in the main application skeleton repository.

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👨‍💻 Author

Augusto Kussema

🌍 Made in Angola

Desenvolvido com ❤️ em Angola 🇦🇴

Semantica Framework - Modern PHP development made simple

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-28