Download the PHP package prolic/humus-stream-response-sender without Composer
On this page you can find all versions of the php package prolic/humus-stream-response-sender. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package humus-stream-response-sender
HumusStreamResponseSender
Introduction
HumusStreamResponseSender is a Zend Framework 2 module that sends stream responses with HTTP Range header, XSendFile & pecl_http support.
Requirements
- Zend Mvc 2.2.1 (latest master)
- Zend Http 2.2.1 (latest master)
- Zend ModuleManager 2.2.1 (latest master)
Features / Goals
- Send stream responses with Zend Framwork 2 [COMPLETE]
- Limit download speed [COMPLETE]
- Allow for range support (download resume) [COMPLETE]
- Send streams with pecl_http extension [INCOMPLETE]
- Send streams with X-SendFile [INCOMPLETE]
- Send streams with X-Accel-Redirect [INCOMPLETE]
- Add controller plugin for easy streaming from controllers [COMPLETE]
Installation
- Add
"prolic/humus-stream-response-sender": "dev-master"
to yourcomposer.json
- Run
php composer.phar install
- Enable the module in your
config/application.config.php
by addingHumusStreamResponseSender
tomodules
Configuration
Sample configuration:
<?php
return array(
'HumusStreamResponseSender' => array(
'enable_speed_limit' => true,
'enable_range_support' => true,
'chunk_size' => 1024 * 1024 // = 1MB/s
),
);
Usage of controller plugin
The simplest way to stream a response from a controller, is the stream plugin.
class IndexController extends AbstractActionController
{
public function fileAction()
{
return $this->plugin('stream')->binaryFile('/path/to/my/file');
}
}
Additional notes
If the speed limit switch is set to true, the used chunksize will also be the download speed in bytes per second
The default configuration is:
- enable_speed_limit = false
- enable_range_support = false
- chunk_size = 262144
All versions of humus-stream-response-sender with dependencies
PHP Build Version
Package Version
Requires
php Version
^5.6|^7.0
zendframework/zend-mvc Version ^2.2.1|^3.0
zendframework/zend-http Version ^2.2.1|^3.0
zendframework/zend-modulemanager Version ^2.2.1|^3.|^3.0
zendframework/zend-servicemanager Version ^2.2.1|^3.0
zendframework/zend-mvc Version ^2.2.1|^3.0
zendframework/zend-http Version ^2.2.1|^3.0
zendframework/zend-modulemanager Version ^2.2.1|^3.|^3.0
zendframework/zend-servicemanager Version ^2.2.1|^3.0
The package prolic/humus-stream-response-sender contains the following files
Loading the files please wait ....