makeweb/updater
Composer 安装命令:
composer require makeweb/updater
包简介
README 文档
README
Connect your plugin to a server running Easy Digital Downloads - Software Licensing
Installation
Installation can be done via composer with:
composer require makeweb/updater
Usage
Autoload package with composer
Make sure you are autoloading the package's classes by requiring the composer autoloader if you are not already. Your main plugin file is usually the best place to require the composer autoloader. You only need to do this once in your plugin.
// Autoload composer dependencies
require __DIR__.'/vendor/autoload.php';
Boot the updater
To boot the uploader in your main plugin file:
// Boot the plugin update client
(new MakeWeb\Updater\Updater(__FILE__))->boot();
You could implement this in any other file as well, but be sure to pass in the full path of the main plugin file to the Updater constructure in place of __FILE__.
Configuration
The update client pulls all neccessarry configuration from main plugin file, drawing from the header comments of the main plugin file and the filename.
For example, take the following header comment block:
/*
Plugin Name: MyCompany Thingamajiggy
Description: Respiculate your stultiloquence
Version: 1.0.0
Author: MyCompany
Author URI: http://example.org
*/
The package will look for an update server at example.org and will attempt to find updates available based on the given plugin name, and version.
Wordpress Settings Page
The package will automatically create a settings page under the Plugins menu called {MyCompany} Plugin Licenses, where the value of {MyCompany} is drawn from the Author header from the main plugin file. If multiple plugins are installed which use this package, plugins with the same Author name will appear on the same page. Each plugin will have a text input field where a license key can be entered to allow the user to update their plugin with updates from the update server.
makeweb/updater 适用场景与选型建议
makeweb/updater 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 662 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 06 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 makeweb/updater 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 makeweb/updater 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 662
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2017-06-23