2017 © Pedro Peláez
 

library file

An extension of SplFileObject that uses exceptions.

image

kherge/file

An extension of SplFileObject that uses exceptions.

  • Friday, January 13, 2017
  • by kherge
  • Repository
  • 1 Watchers
  • 5 Stars
  • 2,017 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

File

SensioLabsInsight ![Build Status][] Latest Stable Version Latest Unstable Version Total Downloads, (*1)

An extension of SplFileObject that uses exceptions., (*2)

Usage

You would use this class the exact same way you use SplFileObject, because it is SplFileObject. The only difference is that errors will throw an exception when they occur., (*3)

use KHerGe\File\File;

$file = new File('example.txt');
$file->fseek(-1);

/* 
 * Fatal error: Uncaught exception 'KHerGe\File\Exception\FileException' with message 'The file "test.txt" could not be seeked.' in /path/to/file/src/lib/KHerGe/File/Exception/FileException.php on line 157
 *
 * KHerGe\File\Exception\FileException: The file "test.txt" could not be seeked. in /path/to/file/src/lib/KHerGe/File/Exception/FileException.php on line 157
 *
 * Call Stack:
 *     0.0001     248992   1. {main}() /path/to/file/test.php:0
 *     0.0011     382928   2. KHerGe\File\File->fseek() /path/to/file/test.php:6
 */

Exceptions originally thrown by SplFileObject will also be wrapped in the FileException class included with this library., (*4)

Requirements

  • PHP >= 5.4

Installation

Via Composer:, (*5)

$ composer require "kherge/file=dev-master"

I recommend that you install the most recent stable release. You can find one on Packagist, the GitHub releases page, or the tag list in the Git repository., (*6)

License

This library is available under the MIT license., (*7)

The Versions

13/01 2017

dev-master

9999999-dev

An extension of SplFileObject that uses exceptions.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

file exception object

08/05 2015

1.3.0

1.3.0.0

An extension of SplFileObject that uses exceptions.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

file exception object

17/09 2014

1.2.0

1.2.0.0

An extension of SplFileObject that uses exceptions.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

file exception object

10/09 2014

1.1.0

1.1.0.0

An extension of SplFileObject that uses exceptions.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

file exception object

25/07 2014

1.0.0

1.0.0.0

An extension of SplFileObject that uses exceptions.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

file exception object