Proposal for "File_Fortune"

» Metadata » Status
» 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.

File_Fortune_Writer provides an interface for manipulating the contents of a
fortune file. It allows you to write a complete fortune file and the associated
binary header file from an array of fortunes. You may also add fortunes, delete
fortunes, or update individual fortunes in a fortune file. All write operations
will produce a binary header file to allow for greater compatability with the
fortune and fortune-mod programs (as well as other fortune interfaces).
» Dependencies » Links
  • PHP >=5.0.0
  • PEAR_Exception (PEAR >= 1.3.4)
» Timeline » Changelog
  • First Draft: 2005-06-25
  • Proposal: 2005-06-25
  • Call for Votes: 2005-07-05
  • Matthew Weier O'Phinney
    [2005-06-26 22:05 UTC]

    Removed PHP5 dependency in favor of PHP >=4.3.0 (uses file_get_contents(), introduced in the 4.3.x series). New package has been tested under PHP 4.3.2, and passes tests.
  • Matthew Weier O'Phinney
    [2005-07-01 15:22 UTC]

    I've reverted to a PHP5-only version. Additionally, I have moved the bulk of the package-level documentation blocks to the class-level docblocks as they contain information on class usage (this allows this info to show up in the generated documentation).

    I have moved the error constants into the classes themselves, which also allowed me to strip the classname prefix; all thrown errors were modified to utilize the new class constants.
  • Matthew Weier O'Phinney
    [2005-07-01 15:23 UTC]

    Fixed typo in PHP dependency.
  • Matthew Weier O'Phinney
    [2005-07-03 00:29 UTC]

    * Added exception handling (to replace error handling):
    * Created Fortune/Exception.php with exception classes
    * Changed all PEAR_ErrorStack errors to exceptions
    * Added @throws docblock entries
    * Rewrote tests to catch exceptions
    * In File_Fortune:
    * Added check in open() for open file; calls close() if so, and then proceeds
    to open file
    * Documentation updates
    * In File_Fortune_Writer
    * Changed to package File_Fortune (not File_Fortune_Writer
    * Documentation updates

    I also added a link to the File_Fortune_Exception PHP source, and updated the package file link.
  • Matthew Weier O'Phinney
    [2005-07-03 04:01 UTC]

    A new package file was linked that contains the following changes:

    Test 5 in __construct.phpt was not working as it erroneously expected an error; this has been corrected. Additionally, a Test 6 was added to test for a header file that is mal-formed.

    phpFortune example was updated to test for exceptions.
  • Matthew Weier O'Phinney
    [2005-07-05 16:31 UTC]

    * Minor documentation changes
    * Changed package.xml to add tasks to autofill @package-version@ and @PHP-BIN@