Download the PHP package moxuandi/yii2-helpers without Composer

On this page you can find all versions of the php package moxuandi/yii2-helpers. 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 yii2-helpers

yii2-helpers: 助手类,通用上传类

提示: 2.2.x版本不再自动引入依赖的扩展!如果使用以下类, 请引入相关的扩展

目录

  1. Helper助手类用法示例

  2. yiisoft/yii2-imagine

  3. yiisoft/yii2-authclient

安装:

使用 composer 下载:

Helper助手类用法示例:

Uploader上传类用法示例:

提示: 如果process.resize的宽高都未设置, 将使用图片的原始宽高; 此时, 可能会压缩图片大小, 但也有可能造成图片大小增大!!!

提示: 缩略图配置中, widthheight其中一个可以设置为null, 此时将按原图比例自动缩放图片. 但不能同时为null!

提示: 配置中的match参数, 当两个元素的值相同时, 将不会保存原图, 而仅保留缩略图.

如果要使用文件保存入库功能, 必须将modelClass设置为类的完全限定名称(eg: common\model\Upload), 该类必须是yii\db\ActiveRecord的子类, 且必须包含一些字段(参考@vendor\moxuandi\yii2-helpers\migrations\m190101_010101_upload.php)

迁移命令: yii migrate --migrationPath=@vendor/moxuandi/yii2-helpers/migrations

OAuth2第三方登录用法示例

参考AuthClient 扩展:

0. yii2-authclient默认提供了以下几个立即可用的客户端:

1. 配置应用程序

2. 向控制器添加动作

参考:向控制器中添加动作

3. 向登录视图添加小部件:

4. 保存授权数据的表结构

5. 申请:


All versions of yii2-helpers with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version ~2.0.24
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 moxuandi/yii2-helpers contains the following files

Loading the files please wait ....