File_Fortune::delete (Previous) (Next) File_Fortune::getDirectory

View this page in Last updated: Sun, 24 Aug 2008
English | French | German | Japanese | Plain HTML

File_Fortune::getAll()

File_Fortune::getAll()  -- Retrieve all fortunes from the current file

Description

getAll() can be used to pull the entire fortune database into an array. Typically this is a bad idea as fortune files are often very large. If you wish to do some processing with each fortune, use the File_Fortune object as an iterator:


<?php
foreach ($fortunes as $fortune) {
    // do something with the fortune
}
?>

Note: you can use getAll() when a directory or multiple files have been set; in such a context, it will return all fortunes in all files.

Throws

throws no exceptions thrown

Note

This function can not be called statically.

File_Fortune::delete (Previous) (Next) File_Fortune::getDirectory

Download Documentation Last updated: Sun, 24 Aug 2008
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.