misteio/cloudinary-bundle
Composer 安装命令:
composer require misteio/cloudinary-bundle
包简介
Cloudinary Wrapper
关键字:
README 文档
README
MisteioCloudinaryBundle is a Symfony2/3 Bundle forked from laravel4-cloudinary (thanks Teeplus) and cloudinary-bundle (thanks Speicher210). You can use it as a service, and some extends are implemented for Twig. Cloudinary Library v1.7.1.
Install
Via Composer
$ composer require misteio/cloudinary-bundle
or in composer.json file
"misteio/cloudinary-bundle": "dev-master"
Register the bundle in app/AppKernel.php:
public function registerBundles() { return array( // ... new Misteio\CloudinaryBundle\MisteioCloudinaryBundle(), // ... ); }
Configuration
Configure the connection to cloudinary in your config.yml :
misteio_cloudinary: cloud_name: yourCloudRegistrationName api_key: yourApiKey secret_key: yourSecretApiKey
Usage
This wrapper api provide simple methods to upload, rename, delete, tag manage and full features from original cloudinary class methods. You can use it via Dependency Injection Component(DIC) service.
$cloudinary = $this -> container -> get('misteio_cloudinary_wrapper');
Upload Image
$cloudinary -> upload('path/to/file', 'name', $tags, $options)
Upload Video (Latest argument is for large files)
$cloudinary -> uploadVideo('path/to/file', 'name', $tags, true)
Display an image
$cloudinary -> show('public_name', array('width' => 150, 'height' => 150, 'crop' => 'fit', 'radius' => 20));
Display an image using HTTPS
$cloudinary -> show('public_name', array('width' => 150, 'height' => 150, 'crop' => 'fit', 'radius' => 20, 'secure' => true));
Display a video
$cloudinary -> showVideo('public_name', array('width' => 150, 'height' => 150, 'crop' => 'fit', 'radius' => 20));
Display a video using HTTPS
$cloudinary -> showVideo('public_name', array('width' => 150, 'height' => 150, 'crop' => 'fit', 'radius' => 20, 'secure' => true));
More document from cloudinary.com
Rename file
$cloudinary -> rename('from_public_id', 'to_public_id');
Delete file
$cloudinary -> destroy('public_id');
Manage with tag
$cloudinary -> addTag('my_tag_1', array('my_public_id', 'my_public_id_2')); $cloudinary -> removeTag('my_tag_2', array('my_public_id', 'my_public_id_2')); $cloudinary -> replaceTag('my_tag_3', array('my_public_id', 'public_id_2'));
Twig for displaying image
{{ 'my_public_id'|cloudinary_url({"width" : 150, "height" : 150, "crop" : "fill", "radius" : 20}) }}
Twig for displaying image using HTTPS
{{ 'my_public_id'|cloudinary_url({"width" : 150, "height" : 150, "crop" : "fill", "radius" : 20, "secure" : true}) }}
Twig for displaying video
{{ 'my_public_id'|cloudinary_url_video({"width" : 150, "height" : 150, "crop" : "fill", "radius" : 20}) }}
Twig for displaying video using HTTPS
{{ 'my_public_id'|cloudinary_url_video({"width" : 150, "height" : 150, "crop" : "fill", "radius" : 20, "secure" : true}) }}
Security
If you discover a security vulnerability , please email instead of using the issue tracker. All security vulnerabilities will be promptly addressed.
License
This Wrapper is open-sourced software licensed under the MIT license
misteio/cloudinary-bundle 适用场景与选型建议
misteio/cloudinary-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 30.83k 次下载、GitHub Stars 达 8, 最近一次更新时间为 2015 年 07 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「bundle」 「cloudinary」 「misteio」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 misteio/cloudinary-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 misteio/cloudinary-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 misteio/cloudinary-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Cloudinary Flysystem 3 integration with Laravel
2lenet/EasyAdminPlusBundle
The bundle for easy using json-rpc api on your project
Provide a way to secure accesses to all routes of an symfony application.
DMS Meetup API Bundle, enables Meetup API clients in services
A PSR-7 compatible library for making CRUD API endpoints
统计信息
- 总下载量: 30.83k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-16