betocampoy/champs_framework 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

betocampoy/champs_framework

Composer 安装命令:

composer require betocampoy/champs_framework

包简介

PHP Framework that implemented main core functions (MVC, Route, Controller, Model, Authentication, Minification, ...)

README 文档

README

Maintainer Source Code PHP from Packagist Latest Version Software License Build Quality Score Total Downloads

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

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固