2017 © Pedro Peláez
 

php-library stream-library

Wrapper for stream functions

image

konstantin-kuklin/stream-library

Wrapper for stream functions

  • Saturday, April 7, 2018
  • by KonstantinKuklin
  • Repository
  • 1 Watchers
  • 2 Stars
  • 764 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

Build Status Scrutinizer Code Quality Scrutinizer Test Coverage Latest Stable Version Total Downloads, (*1)

README

What is StreamLibrary?

StreamLibrary is a PHP wrapper via stream functions. It allows to work with streams with more comfortable environment., (*2)

Requirements

StreamLibrary is only supported on PHP 5 and up., (*3)

Installation

The best way to install StreamLibrary is with composer:, (*4)

composer.phar require konstantin-kuklin/stream-library:dev-master

Documentation

First step to work is a creating object of Stream:, (*5)

$stream = new \Stream\Stream($path, $protocol, $port, $driver);

path - Path to file on system or ip address in network or hostname which we will work, (*6)

protocol - String value of protocol type, can be Connection::PROTOCOL_TCP, Connection::PROTOCOL_UDP, Connection::PROTOCOL_UNIX, (*7)

port - Integer value of port to connect. Not needs if protocol Connection::PROTOCOL_UNIX. Default value = 0., (*8)

driver - Object implements StreamDriverInterface. If your connection need to change transfer data you need to describe it logic with this object. Default value is null(mean data haven't been changed), (*9)

Get data from Stream

$stream = new \Stream\Stream($path, $protocol, $port, $driver);
$stream->setReceiveMethod(new StreamGetContentsMethod($maxLength, $offset));
$stream->getContents();

maxLength - The maximum bytes to read. Default value is -1 (read all the remaining buffer), (*10)

offset - Seek to the specified offset before reading. Default value is -1 (read without offset), (*11)

Send data to Stream

$stream = new \Stream\Stream($path, $protocol, $port, $driver);
$stream->sendContents($contents);

contents - can contain any string data, (*12)

The Versions

07/04 2018

dev-master

9999999-dev https://github.com/KonstantinKuklin/StreamLibrary

Wrapper for stream functions

  Sources   Download

MIT

The Requires

 

The Development Requires

by Konstantin Kuklin

php library stream

07/04 2018

1.0.1

1.0.1.0 https://github.com/KonstantinKuklin/StreamLibrary

Wrapper for stream functions

  Sources   Download

MIT

The Requires

 

The Development Requires

by Konstantin Kuklin

php library stream

07/04 2018

dev-fix_dependencies

dev-fix_dependencies https://github.com/KonstantinKuklin/StreamLibrary

Wrapper for stream functions

  Sources   Download

MIT

The Requires

 

The Development Requires

by Konstantin Kuklin

php library stream

07/04 2018

1.0.0

1.0.0.0 https://github.com/KonstantinKuklin/StreamLibrary

Wrapper for stream functions

  Sources   Download

MIT

The Requires

 

The Development Requires

by Konstantin Kuklin

php library stream

29/08 2014

0.04

0.04.0.0 https://github.com/KonstantinKuklin/StreamLibrary

Wrapper for stream functions

  Sources   Download

MIT

The Requires

 

by Konstantin Kuklin

php library stream

29/08 2014

0.03

0.03.0.0 https://github.com/KonstantinKuklin/StreamLibrary

Wrapper for stream functions

  Sources   Download

MIT

The Requires

 

by Konstantin Kuklin

php library stream

27/08 2014

0.02

0.02.0.0 https://github.com/KonstantinKuklin/StreamLibrary

Wrapper for stream functions

  Sources   Download

MIT

The Requires

 

by Konstantin Kuklin

php library stream

09/08 2014

0.01

0.01.0.0 https://github.com/KonstantinKuklin/StreamLibrary

Wrapper for stream functions

  Sources   Download

MIT

The Requires

 

by Konstantin Kuklin

php library stream