pachel/easyframework 问题修复 & 功能扩展

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

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

pachel/easyframework

最新稳定版本:1.0

Composer 安装命令:

composer require pachel/easyframework

包简介

Easy Framework

README 文档

README

klasj dlkasjdlkjasdél kj

asjdh kjash dkjash jkdh ashd

jash dkjash djk

  • asdasdasdas
  • asdasdasd
    • asdasdasd

Basic usage

<?php
use Pachel\EasyFrameWork\Base;
ob_start();
session_start();
require_once __DIR__."/../vendor/autoload.php";

$config = [
  "APP" => [
      "URL" => "http://localhost/easyframe/examples/",
      "UI" => __DIR__."/../UI/",
      "VIEWs" => __DIR__."/../UI/views/",
      "LOGS" => __DIR__."/../logs/"            
  ]
];
$App = Base::instance();
$App->config($config);

//Loads the template.html file from the folder APP.VIEWS to any get request
$App->Routing()->get("*")->view("index.html");
$App->run();
?>

Config

Required parameters

  • APP
    • URL
    • UI

If the APP.VIEW folder is not set up, the app is looking for templates in the APP.UI folder

Nice to have

  • APP
    • VIEWS
    • LOGS

Usage

Example1

$config = [
  "APP" => [
    "URL" => "http://localhost",  
    "UI" => "UI FOLDER"  
  ]
];

$App->config($config);

Example2

config.php

//Content of your config file
<?php
return [
  "APP" => [
    "URL" => "http://localhost",  
    "UI" => "UI FOLDER"  
  ]
];

index.php

<?php
$App->config("Your config file's path");

How to access configuration file data?

//From everywhere
Base::instance()->env("APP.URL");

//From text/html code
{{APP.URL}}

//From php code
echo $APP["URL"];

Routing

Az útvonalakat a Routes osztály segítségével kell létrehozni, de mindenképp a cofig beállítása után!!

Routes to _GET methods

//http://yourdomain/
$Routing = Routes::instance();
$Routing->get("/")->view("index.html");

Routes to _POST methods

//http://yourdomain/
$Routing->post("/")->view("index.html");

Routes to any methods

//http://yourdomain/
$Routing->postget("/")->view("index.html");

Parameters of post() get() postget() cli()

$path

asdasd

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-12-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固