2017 © Pedro Peláez
 

library temp-file

TempFile is a small library inspired by the SplTempFileObject providing solutions for commonly occurring tasks when dealing with temporary files.

image

arne-groskurth/temp-file

TempFile is a small library inspired by the SplTempFileObject providing solutions for commonly occurring tasks when dealing with temporary files.

  • Wednesday, February 21, 2018
  • by arnegroskurth
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4,625 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 11 % Grown

The README.md

TempFile

Build Status codecov License, (*1)

TempFile is a small library inspired by the SplTempFileObject providing solutions for commonly occurring tasks when dealing with temporary files., (*2)

Setup

$ composer require arne-groskurth/temp-file

Usage

<?php

use ArneGroskurth\TempFile\TempFile;

$tempFile = new TempFile();

// TempFile offers all commonly used file-related functions including fread, fwrite, ftell, fseek and feof.
$tempFile->fwrite('Hello World!');

// Construct response object and write to stdout
// (Requires installation of package "symfony/http-foundation")
$tempFile->send();

// Obtain path-based access to temporary file within callback function
$tempFile->accessPath(function($path) {

    $content = file_get_contents($path);

    $content = str_replace('Hello World!', 'Got you!', $content);

    file_put_contents($path, $content);
});

// Echos 'Got yout!'
print $tempFile->getContent();

// Persist temporary file to some path
$tempFile->persist('/my/path/filename.ext');

The Versions

21/02 2018

dev-master

9999999-dev https://github.com/arnegroskurth/TempFile

TempFile is a small library inspired by the SplTempFileObject providing solutions for commonly occurring tasks when dealing with temporary files.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arne Groskurth

file temp splfileobject

21/02 2018

v1.3.0

1.3.0.0 https://github.com/arnegroskurth/TempFile

TempFile is an extension to SplTempFileObject providing additional functions for sending http responses and persisting the temporary file.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arne Groskurth

file temp splfileobject

14/12 2016

v1.2.3

1.2.3.0 https://github.com/arnegroskurth/TempFile

TempFile is an extension to SplTempFileObject providing additional functions for sending http responses and persisting the temporary file.

  Sources   Download

MIT

The Requires

  • php ^5.4|^7.0

 

The Development Requires

by Arne Groskurth

file temp splfileobject

29/11 2016

v1.2.2

1.2.2.0 https://github.com/arnegroskurth/TempFile

TempFile is an extension to SplTempFileObject providing additional functions for sending http responses and persisting the temporary file.

  Sources   Download

MIT

The Requires

  • php ^5.4|^7.0

 

The Development Requires

by Arne Groskurth

file temp splfileobject

22/11 2016

v1.2.1

1.2.1.0 https://github.com/arnegroskurth/TempFile

TempFile is an extension to SplTempFileObject providing additional functions for sending http responses and persisting the temporary file.

  Sources   Download

MIT

The Requires

  • php ^5.4|^7.0

 

The Development Requires

by Arne Groskurth

file temp splfileobject

10/11 2016

v1.2

1.2.0.0 https://github.com/arnegroskurth/TempFile

TempFile is an extension to SplTempFileObject providing additional functions for sending http responses and persisting the temporary file.

  Sources   Download

MIT

The Requires

  • php ^5.4|^7.0

 

The Development Requires

by Arne Groskurth

file temp splfileobject

27/09 2016

v1.1

1.1.0.0 https://github.com/arnegroskurth/TempFile

TempFile is an extension to SplTempFileObject providing additional functions for sending http responses and persisting the temporary file.

  Sources   Download

MIT

The Requires

  • php ^5.4|^7.0

 

The Development Requires

by Arne Groskurth

file temp splfileobject

27/09 2016

v1.0

1.0.0.0 https://github.com/arnegroskurth/TempFile

TempFile is an extension to SplTempFileObject providing additional functions for sending http responses and persisting the temporary file.

  Sources   Download

MIT

The Requires

  • php ^5.4|^7.0

 

The Development Requires

by Arne Groskurth

file temp splfileobject