arx / utils
此包已被弃用,不再维护。未建议替代包。
Arx Utils 类,可在任何类型的项目中使用
4.2.2
2015-03-13 12:46 UTC
Requires
- php: >=5.4.0
- illuminate/support: 4.2.*
README
功能
- 一些有用的 PHP 类和方法(灵感来自 Laravel),可用于任何类型的 PHP 项目
入门
要求
- PHP > 5.3
- Composer
安装
在 composer.json
文件的 require
键中添加以下内容
"arx/utils": "dev-master"
$ composer update
require 'vendor/autoload.php'
如何使用
require 'vendor/autoload.php'; use Arx\Utils\Utils; # Debug method Utils::pre(['test']); # Debug with die Utils::predie('test'); # Make an alias helper Utils::alias('dd', 'Utils::predie'); # Manipulate an array ## Merge recursively Arx\Utils\Arr::merge(['test' => ['foo1']], ['test' => ['foo2']]); # Manipulate an image ## Resize an image to best fix max width, max height Arx\Utils\Image::load('$$path$$')->best_fit(400, 400)->save($$dest_path$$); ## Resize an image to best fix max width, max height and output Base64 string Arx\Utils\Image::load('$$path$$')->fit_to_width(400)->outputBase64(); # output as base64 to load directly from img src
发行说明
版本 4.2.0
- 使用 Laravel 标签版本简化版本对应关系(因此我们直接跳到 4.2 而不是 1.0)
许可证
Arx Utils 是免费软件,根据 MIT 许可证条款分发
附加信息
有任何问题,请随时联系我或在这里提问
有任何问题,请在此报告