承接 gcsystem/scaffolding 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

gcsystem/scaffolding

Composer 安装命令:

composer create-project gcsystem/scaffolding

包简介

GCsystem PHP Framework scaffolding plugin

README 文档

README

  • Open-Source
  • Version : 3.1 Bêta
  • Author : Fabsgc
  • Contributors : Lucas5190, t1307
  • Description : GCsystem Framework scaffolding plugin

Installation :

  • In composer add
"autoload": {
	"psr-4": {
		"Scaffolding\\" : "vendor/gcsystem/scaffolding/src"
	}
},

Then, create a new controller and change the extends Controller by extends \Scaffolding\Scaffolding

<?php
	namespace Gcs;

	use System\Config\Config;
	use System\Response\Response;

	/**
	 * Class Scaffolding
	 * @package Gcs
	 * @Before(class="\Gcs\Scaffolding", method="init")
	 */

	class Scaffolding extends \Scaffolding\Scaffolding {

		public function init() {
			if (Config::config()['user']['debug']['environment'] != 'development') {
				Response::instance()->status(404);
			}
		}
	}

There are five actions and all except the first take one or two GET parameters : "entity" (the entity name) and id (the primary key) :

  • home
  • entity
  • insert
  • update
  • delete

You can override all of these methods to custom your administration.

Then for example create these routes :

<group name="scaffolding" url="/scaffolding" action="scaffolding">
  <route name="default" url="(/*)" action="home"/>
  <route name="insert" url="/entity/insert/([a-zA-Z]+)(/*)" action="insert" vars="entity"/>
  <route name="update" url="/entity/update/([a-zA-Z]+)/([0-9]+)(/*)" action="update" vars="entity,id"/>
  <route name="delete" url="/entity/delete/([a-zA-Z]+)/([0-9]+)(/*)" action="delete" vars="entity,id"/>
  <route name="entity" url="/entity/([a-zA-Z]+)(/*)" action="entity" vars="entity"/>
</group>

Licence :

licence MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-03