承接 microstudi/silex-image-controller 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

microstudi/silex-image-controller

Composer 安装命令:

composer require microstudi/silex-image-controller

包简介

Microstudi/Image Controller Service Provider for Silex.

README 文档

README

A auto-image resize controller using Intervention/image service provider for Silex

Downloads Travis status License

Requirements

Install

Using composer:

composer require microstudi/silex-image-controller

Usage

use Microstudi\Silex\ImageController\ImageController;
use Microstudi\Silex\InterventionImage\InterventionImageServiceProvider;

$app = new Silex\Application();
$app->register(new InterventionImageServiceProvider);
      ;

//Automatic images
$app->mount('/your_path', new ImageController(array(
                'image_path' => '/path/to/original/images',
                'image_cache_path' => '/path/to/cache/folder'
            ) ));

$app->run();

Twig Helper: If twig is present a convenient function can be used to generate proper urls for auto-resized images image_path(image, size):

{{ image_path('path/to/image.png', 100, 100) }}
{{ image_path('path/to/image.png', 100, 100, 'c') }}

URLs examples:

your_path/200x300/products/image_product.jpg    <- width or height will be
                                                   changed if necessary but
                                                   never increased
your_path/200x300xc/products/image_product.jpg  <- cropped, ensures exact sizes
your_path/200x0/products/image_product.jpg      <- auto-calculate height
your_path/0x300/products/image_product.jpg      <- auto-calculate width

Options

  • intervention.image - Instance of Intervention\Image\ImageManager.
  • intervention.response - For use ImageManager directly such as $app['intervention.response']($image)
  • intervention.driver - Driver used (imagick or gd)

Tests

$ composer install
$ vendor/bin/phpunit

Changelog

2.0.2

  • README example fix.

2.0.0

  • Updated for Silex 2.0

1.0.1

  • Readme fix
  • Locked Silex to version 1.1

1.0.0

  • First release

LICENSE

The MIT LICENSE (MIT)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-01-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固