Download the PHP package icy8/drcms5-addon without Composer

On this page you can find all versions of the php package icy8/drcms5-addon. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package drcms5-addon

drcms5-addon

thinkphp5.0 实现插件功能

项目介绍

主仓 https://github.com/d2gin/drcms5-addon

国内仓 https://gitee.com/icy8/drcms5-addon

这是一个基于 thinkphp5.0实现的插件依赖,目前只支持5.0版本,切勿在5.1及以上使用。

默认的插件总目录是./addons/,可以自行更改,但不建议更改。

暂处于测试阶段,可能有比较多的地方不完善。

环境要求

php >= 7.0

thinkphp 5.0

composer

安装

功能介绍

  1. 安装机制: 插件的安装目前没有接入数据库,只读取插件目录。设计上有两个目录是主程序覆盖目录,分别是applicationpublic,这两个目录会在安装时移动覆盖主程序的文件/目录,有冲突会中断安装。还有一个目录是资源目录assets,安装过程中会在程序根目录自动创建[ROOT_PATH]/public/assets/addons/[addo_name]/ 并将文件移入该目录。
  2. 卸载机制: 删除根目录的资源文件;删除插件目录。
  3. 开启机制: 暂无
  4. 关闭机制: 暂无
  5. 上述机制均可在插件主类中自定义installuninstallenabledisable 方法进行扩展。
  6. 插件主类: 类文件必须放置在 addons/[addon_name]/[addon_name].php 类名必须与插件名一致。
  7. 插件访问: http://127.0.0.1/addon/[addon_name]/[controller]/[action] 过程会自动调用插件控制器
  8. 插件控制器: 插件访问的基础,所有控制器都必须放置在addons/[addon_name]/controller 文件夹中,支持多级控制器。插件控制器必须继承drcms5\addon\Controller,否则会导致模版引用失败。
  9. 插件模版: 同上,文件放在addons/[addon_name]/view
  10. URL生成: 用于插件访问的URL可以用函数addon_url($url = '', $vars = '', $suffix = true, $domain = false)生成,注意:这是只针对插件访问URL的,主程序URL请用框架自带函数。如果不喜欢用函数的可以使用\drcms5\addon\util\AddonUrl::build()方法生成,效果是一致的。

插件示例

demo目录有一个简单的示例,复制至程序根目录的./addons/

运行指令

访问 http://yourdomain/draddon/drmo/test/index

出现下面文字即安装成功

阅读示例从Drmo.php入手,有简单注释。

指令

为了方便测试,我特地做了一个简单的指令。

后续版本


All versions of drcms5-addon with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package icy8/drcms5-addon contains the following files

Loading the files please wait ....