gelembjuk/php-easy-app 问题修复 & 功能扩展

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

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

gelembjuk/php-easy-app

最新稳定版本:v0.2

Composer 安装命令:

composer require gelembjuk/php-easy-app

包简介

ThePHP Package for building Web applications as fast as possible. This package enables you to create web services efficiently, allowing you to build robust solutions with minimal development time.

README 文档

README

PHP Package for building Web applications as fast as possible.

This package enables you to create web services efficiently, allowing you to build robust solutions with minimal development time.

The idea is that a developer should spent minimum time on infrastructure of the application, reading a request and building the response. The developer should think only one the buisiness logic of the application. But should not care a lot about how to parse a request and how to build correct response format based on a request context.

Example

One of use cases.

Sometimes your application raises NotFoundException. Depending on a request you will want to return a JSON document with the error description, but in other case it would be a HTML page with the error. But yet on other case it will be a redirect to some other page.

This application automates this. The format of the response is decided in the smart way depending on a context.

Installation

Using composer: gelembjuk/php-easy-app require: {"gelembjuk/php-easy-app": "*"}

composer require gelembjuk/php-easy-app

Hello World!

<?php

require '../src/vendor/autoload.php';

class HelloWorld extends \Gelembjuk\EasyApp\Controller {
	protected function get()
	{
		return "Hello World!";
	}
}

$action = new \Gelembjuk\EasyApp\Action();
$action->context->config->traceErrors = true;
$action->
	withDefaultController(HelloWorld::class)->
	action()->
	standardOutput();

Usage

This is simplest "one file" example of an app usage. On a practice you will have smoe more files/folders. But it will be same standard structure for all our apps.


Author

Roman Gelembjuk (@gelembjuk)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-01