betocampoy/champs_framework
Composer 安装命令:
composer require betocampoy/champs_framework
包简介
PHP Framework that implemented main core functions (MVC, Route, Controller, Model, Authentication, Minification, ...)
关键字:
README 文档
README
Champs Framework was developed by studying purposes only. DON'T USE IT IN PRODUCTION ENVIRONMENTS.
Champs Framework foi desenvolvido para fins de estudo e aprendizado. NÃO UTILIZE EM AMBIENTES DE PRODUÇÃO.
Main Resources [Principais Recursos].
- MVC architecture [Arquitetura MVC]
- Router layer with friendly URLs [Camada Router com URLs amigáveis]
- Model layer to simplify access to the MySql Database Server [Camada Model, para simplicar o acesso ao banco de dados]
- View layer using league/plates package [Camada de View utilizando o pacote league/plates]
- Controller Layer implements CSRF control and Inputs Validation (using rakit/validation package) [Camada de controle, já implementado controle de CSRF, Validação de Inputs (utiliza o pacote * rakit/validation*)]
- Message Object to standarize messages in all aplication [Objeto Message para padronizar as mensagens em toda a aplicação]
- Session Object to standarize session manipulation [Objeto Session para padronizar a manipulação da sessão]
- Authentication based in Users, Roles and Permissions [Autenticação baseado em Usuarios, Perfis e Permissões]
Installation [Instalação]
ChampsFramework is available via Composer:
Example of a clean composer.json file.
{
"authors": [
{
"name": "Creator Author Name",
"email": "author@email.com",
"homepage": "url.of.project",
"role": "Developer"
}
],
"description": "Description of you project",
"config": {"vendor-dir": "vendor"},
"autoload": {
"psr-4": {"Source\\": "Source/"}
},
"require": {
"php": "^7.4",
"betocampoy/champs_framework": "1.0.*"
}
}
"betocampoy/champs_framework": "1.0.*"
or run
composer require betocampoy/champs_framework
Initial Configurations [Configurações Iniciais]
1. Create .htaccess file in root project folder [Criar o arquivo ***
.htaccess*** no diretório raiz do projeto]
.htaccess file example [Exemplo de arquvivo .htaccess]
RewriteEngine On Options All -Indexes ## ROUTER WWW Redirect. #RewriteCond %{HTTP_HOST} !^www\. [NC] #RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] ## ROUTER HTTPS Redirect #RewriteCond %{HTTP:X-Forwarded-Proto} !https #RewriteCond %{HTTPS} off #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # ROUTER URL Rewrite RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*)$ index.php?route=/$1 [L,QSA]
2. Create index.php file in root project folder [Criar o arquivo ***
index.php*** no diretório raiz do projeto]
index.php file example [Exemplo de arquivo index.php]
<?php ob_start(); date_default_timezone_set('America/Sao_Paulo'); require __DIR__ . "/vendor/autoload.php"; /** * BOOTSTRAP */ use BetoCampoy\ChampsFramework\Session; use BetoCampoy\ChampsFramework\Router\Router; use function ICanBoogie\pluralize; $session = new Session(); $route = new Router(url(), ":"); $route->namespace("Source\App"); /** * EXAMPLE THEME ROUTES */ $route->group(null); $route->get("/", "WebExample:home"); $route->get("/terms", "WebExample:terms"); $route->get("/contact", "WebExample:contact"); /** * CREATE YOUR CUSTOM ROUTES BELOW */ /** * CREATE YOUR CUSTOM ROUTES ABOVE */ /** * ROUTE DISPATCH */ $route->dispatch(); /** * ERROR REDIRECT */ if ($route->error()) { $route->redirect( $route->route("default.error", ["errcode" => $route->error()])); } ob_end_flush();
Documentation [Documentação]
To open Champs Framework documentation, access the route /champs-docs.
Para abrir a documentação do Champs Framework, acesse a rota /champs-docs.
Contributing [Contribuições]
Please see CONTRIBUTING for details.
Pro favor, veja CONTRIBUTING para mais detalhes.
Support [Suporte]
Security: If you discover any security related issues, please email beto.campoy@gmail.com instead of using the issue tracker.
Se você descobrir algum problema relacionado à segurança, envie um e-mail para beto.campoy@gmail.com em vez de usar o rastreador de problemas.
Thank you [Obrigado]
Credits
- Beto Campoy (Developer)
- All Contributors (This Rock)
License
The MIT License (MIT). Please see License File for more information.
betocampoy/champs_framework 适用场景与选型建议
betocampoy/champs_framework 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 208 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 12 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「model layer」 「session as object」 「PHP Framework MVC Based」 「Router Layer」 「Controller Layer」 「Message as object」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 betocampoy/champs_framework 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 betocampoy/champs_framework 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 betocampoy/champs_framework 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Secure session middleware for Slim 3 framework
ADOdb is a PHP database abstraction layer library
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
Interfaces for web resource models and services to retrieve and create them
Non-I/O blocking PHP SessionHandler implementation using Nette/Caching with DI Extension for Nette framework
Laravel 5 - Repositories to the database layer
统计信息
- 总下载量: 208
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-12-26