cafelatte/library
Composer 安装命令:
composer require cafelatte/library
包简介
Libraries are working based on Cafelatte Framework. It contains few function such as uploading, en-decrypting, image-resizing etc.
README 文档
README
These libraries ar working based on Cafelatte Framework is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs. These libraries contains uploading, en-decrypting, image-resizing etc.
Core Features
- Upload
- Encrypt-Decrypt
- Image Resize
How To Use
Upload Files
should contain this code:
<?php
use CafeLatte\Libraries\FileUploader;
try {
$firstFileName = FileUploader::create("/",$this->request->file('test01'))->upload()->getResult();
echo $firstFileName01;
} catch (Exception $ex) {
echo $ex->getMessage();
}
En-Decrypt Data
should contain this code:
<?php
use CafeLatte\Libraries\Endecrypt;
$key = "secureKey_whatever_you_want";
$iv = "iv";
$text = "test";
$cipher = "aes-256-cbc";
$encryptedText = Endecrypt::create($key, $iv, $cipher)->encrypt($text);
echo "encrypted Text : ". $encryptedText . "\n";
$decryptedText = Endecrypt::create($key, $iv)->decrypt($encryptedText);
echo "decrypted Text : ". $decryptedText . "\n";
Resize Images
should contain this code:
<?php
use CafeLatte\Libraries\ImageResize;
try {
$newFileName = ImageResize::create("test.jpg", './', 100, 100, 100, "auto")->getResult();
echo $newFileName;
} catch (Exception $ex) {
echo $ex->getMessage();
};
License
The Library is released under the MIT public license.
统计信息
- 总下载量: 145
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-10-31