File_Fortune::update

File_Fortune::update() – Update an existing fortune

Synopsis

require_once 'File/Fortune.php';

void File_Fortune::update ( int $index , string $fortune )

Description

update() may be used to update fortunes. However, the recommended practice is to use array access:

<?php
$fortunes
[2] = 'Updated fortunes are fun!';

If multiple files or a directory have been set, you cannot manipulate the fortune list, and this method will raise an exception.

Parameter

integer $index

string $fortune

Throws

throws File_Fortune_Exception

Note

This function can not be called statically.