Home » File Formats » File_Fortune
File_Fortune provides an interface for reading from and writing to fortune files.
This package is unmaintained.
Download latest release 1.0.0 (archived versions might be outdated)
License: New BSD License
Description
File_Fortune provides a PHP interface to reading fortune files. With it, you may
retrieve a single fortune, a random fortune, or all fortunes in the file.
Additionally, it offers the ability to access fortune files as if they were a
native array, including updating and deleting items. All write operations will
produce a binary header file to allow compatability with the fortune and
fortune-mod programs (as well as other fortune interfaces).
Documentation
Maintainers
- Matthew Weier O'Phinney (weierophinney) — lead, active
Dependencies
Required
- PHP (>= 5.1.4)
- PEAR Installer (>= 1.4.0a12)
Releases
- 1.0.0 (stable, 2007-07-24)
Release notes
License: New BSD License
* Stable version
- 1.0.0RC2 (beta, 2007-07-10)
Release notes
License: New BSD License
* Fixed issue with getRandom() using directory/multiple files
- 1.0.0RC1 (beta, 2007-07-08)
Release notes
License: New BSD License
* Allow counting all fortunes in all files
* getAll() counts all fortunes in all files
* No iteration when directory/multiple files set
* No array access when a directory/multiple files set
* Allow passing an array of files to constructor - 0.9.2 (beta, 2007-07-05)
Release notes
License: New BSD License
Added set|getFiles() to allow specifying a specific list of files from which to select fortunes
- 0.9.1 (beta, 2007-07-05)
Release notes
License: New BSD License
Refactored to use Iterator, Countable, and ArrayAccess, allowing in-place modification of fortune files and omitting the necessity for File_Fortune_Writer; also changed license to New BSD
- 0.9.0 (beta, 2005-07-14)
Release notes
License: PHP
2005-07-13: 0.9.0
================
* Initial PEAR release:
* Fixed typo in File_Fortune_Writer when throwing an exception
* Renamed exception classes to conform to PEAR CS
* Created tutorial documentation (slightly expanded version of what was in API
docs)
* Trimmed down the API docs to omit examples
* Added getRandomFromSet() method and corresponding unit test; allows grabbing
a random fortune from a list of files
* Updates to phpFortune example to use getRandomFromSet()
Bugs
| ID | Status | Type | Version | Date | Summary |
|---|---|---|---|---|---|
| #11532 | Closed | Req | 0.9.1 | 2007-07-05 | Add ability to specify a list of fortune files |
| #11533 | Wont fix | Req | 0.9.1 | 2007-07-05 | Modify File_Fortune to use streams instead of file access |