amalranganath/a-demo-plugin
Composer 安装命令:
composer create-project amalranganath/a-demo-plugin
包简介
A Framework Demo Plugin
README 文档
README
A Framework - Demo Plugin
A is a Simple MVC Framework to develop Wordpress plugins easily. This is the demo plugin created using A Framework which is to give you a brief idea about how it works. Please give it a try and report if you find any issues.
DIRECTORY STRUCTURE
assets/ contains assets definition
components/ contains components (any helper class)
controllers/ contains Web controller classes
models/ contains model classes
vendor/ contains dependent 3rd-party packages
views/ contains view files for the Web application
REQUIREMENTS
The minimum requirement by this project template that your Web server supports PHP 5.4.0. Also you should have installed Wordpress latest (at least 4.9.7) version.
INSTALLATION
Install via Composer
If you do not have Composer, you may install it by following the instructions at getcomposer.org.
Go to the wp-contet/plugins/ folder of your Wordpress project and type the following command:
composer create-project --stability=dev amalranganath/a-demo-plugin
cd a-demo-plugin/
composer update
Now you should be able to see the "A Demo Plugin" in the plugins listing.
START DEVELOPMENT
Find the plugin-name.php file in plugin root wp-contet/plugins/a-demo-plugin/ folder and change the plugin details inside the comment as you wish.
Do not change the framework include code. You may define anything to run when activating the plugin inside register_activation_hook as usual.
All the other developments go under "MVC" design as you can see inside the controllers, models and views folders.
CONFIGURATION
All configurations are defined in the file config.php. Read the following sample code to get an idea how to define the each attribute:
When creating templates for the admin (in views/admin/) menu pages and tabs, file name should be the slug.
return [ 'id' => 'plugin-id', 'name' => 'Plugin Name', /** Do not change **/ 'basePath' => plugin_dir_path(__FILE__), 'baseUrl' => plugins_url('/', __FILE__), 'baseName' => plugin_basename(__FILE__), 'i18n' => 'language-domain-name', /** Admin menu and pages of the plugin **/ 'admin' => [ 'class' => 'Admin controller class name', /** Main menu item **/ 'mainMenu' => [ 'pageTitle' => 'The Page title', 'title' => 'The menu title', 'slug' => 'main-menu-slug', 'icon' => 'The menu icon class', 'position' => 'The menu item position' ], /** Sub menu items **/ 'pages' => [ 'menu-item-1' => [ 'pageTitle' => 'The Page title', 'title' => 'The menu title', 'slug' => 'menu-item-1-slug', /** The tabs **/ 'tabs' => [ 'tab-1-slug' => 'tab 1 Title', 'tab-2-slug' => 'tab 2 Title', ] ], 'menu-item-2' => [ 'pageTitle' => 'The Page title', 'title' => 'The menu item 2 title', 'slug' => 'menu-item-2-slug', ] ] ];
DOCUMENTATION
Coming soon ...
amalranganath/a-demo-plugin 适用场景与选型建议
amalranganath/a-demo-plugin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 20 次下载、GitHub Stars 达 2, 最近一次更新时间为 2018 年 07 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「a demo plugin」 「a framework」 「demo plugin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 amalranganath/a-demo-plugin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 amalranganath/a-demo-plugin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 amalranganath/a-demo-plugin 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Framework HLEB2 is the foundation of the web application. Provides ease of development and application performance.
CakePHP 4.x AdminLTE Theme.
The Aura Framework_Demo package provides sample 'Hello World' web and CLI demos for the Aura framework.
Plugin for YOURLS. Default tools to use in some laemmi plugins
allows you to review sunnysideup/ecommerce
Demo project for the Cora development framework. Cora is a framework for easily building MVC style web applications.
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-07-20