svycka/sv-images 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

svycka/sv-images

最新稳定版本:0.1.0

Composer 安装命令:

composer require svycka/sv-images

包简介

Image manipulation library written in PHP, similar to cloud image processing services like Imgix and Cloudinary. This module simplifies image manipulation for Zend Framework 2

README 文档

README

Build Status Coverage Status Quality Score Latest Version on Packagist Software License Total Downloads

Image manipulation library written in PHP, similar to cloud image processing services like Imgix and Cloudinary. This module simplifies image manipulation for Zend Framework 2

Install

Via Composer

$ composer require svycka/sv-images

Basic Usage

  • Register SvImages as module in config/application.config.php
  • Create filesystem factory, exmaple:
class ImageFilesystemFactory implements FactoryInterface
{
    public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $flysystem = new \League\Flysystem\Filesystem(new Local(__DIR__.'/path/to/files'));
        $adapter = new \SvImages\Filesystem\Adapter\FlySystemAdapter($flysystem);
        return new \SvImages\Filesystem\Filesystem($adapter);
    }
}
  • Create cache storage, for best performance should point to public directory, so once cache is generated PHP will not be hit at all, example:
class ImageCacheStorageFactory implements FactoryInterface
{
    public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $flysystem = new \League\Flysystem\Filesystem(new Local(__DIR__.'/path/to/public'));
        return new \SvImages\Cache\FlySystemStorage($flysystem);
    }
}

Change log

Please see CHANGELOG for more information what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 94
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-26