kigkonsult/gectrl 问题修复 & 功能扩展

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

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

kigkonsult/gectrl

Composer 安装命令:

composer require kigkonsult/gectrl

包简介

PHP generic controller for MVC, implements the strategy pattern

README 文档

README

Gectrl is a PHP generic controller class package

  • Supports the MVC software design pattern
  • Distinguish controller and application logic using a strategy pattern

The controller

  • provides coordination logic

  • delegates application logic to actionClasses

  • using implementations of the (strategy) ActionClassInterface,

  • invoking of actionClass condition evaluate and opt, logic doAction methods,

  • passing all data information in an encapsulated Package class instance

    • input, output, config, logger etc

Usage

Basic

Simpler (http/html) example

<?php
namespace Kigkonsult\Gectrl;
use ActionSrc\PrepAction;
use ActionSrc\CreateAction;
use ActionSrc\ReadAction;
use ActionSrc\UpdateAction;
use ActionSrc\DeleteAction;
use ActionSrc\CatchUpAction;
require 'vendor/autoload.php';

...

$package = Gectrl::init( $config, $logger )
    ->setActionClasses(
        [
            PrepAction::class,
            CreateAction::class,
            ReadAction::class,
            UpdateAction::class,
            DeleteAction::class,
            CatchUpAction::class,
        ]
    )
    ->main( $_REQUEST );
...

echo $package->getOutput();

For more detailed usage, read Gectrl, ActionClassInterface and Package docs.

Installation

Composer, from the Command Line:

composer require kigkonsult/gectrl

In your composer.json:

{
    "require": {
        "kigkonsult/gectrl": "dev-master"
    }
}

Version 1.8 supports PHP 8, 1.6 7.4, 1.4 7.0.

Sponsorship

Donation using paypal.me/kigkonsult are appreciated. For invoice, please email.

Licence

Gectrl is licensed under the LGPLv3 License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2021-01-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固