Class Fortune

Description

Implements interfaces:

Get fortune!

Get fortune!

  • author: Francesco Laurita
  • version: 1.0

Located in /Fortune.class.php (line 63)


	
			
Method Summary
Fortune __construct (mixed $dictPath)
string formatFortune (string $fortune)
mixed getFortune ()
void setFormatter (iFormatFortune $formatter)
void setMaxLine (int $maxLine)
Methods
Constructor __construct (line 77)

Create an instance of Fortune

Create an instance of Fortune $dictPath could be an array of paths or a string if you have just one location

  • access: public
Fortune __construct (mixed $dictPath)
  • mixed $dictPath: the directory which contains fortune files
formatFortune (line 232)

the implemented method of iFormatFortune

the implemented method of iFormatFortune By default, it returns just the raw text loaded

  • access: public
string formatFortune (string $fortune)
  • string $fortune
getFortune (line 207)

Return the actual fortune.

Return the actual fortune. If a iFormatFortune has been added then the fortune will be formatted as you choose. If no iFormatFortune was given, the default is simple text output

  • access: public
mixed getFortune ()
setFormatter (line 133)

You can add your custom formatter just implementing

You can add your custom formatter just implementing the iFormatFortune interface

void setFormatter (iFormatFortune $formatter)
setMaxLine (line 121)

You can skip all fortunes with too much lines

You can skip all fortunes with too much lines just setting the max value you prefear

  • access: public
void setMaxLine (int $maxLine)
  • int $maxLine

Documentation generated on Sun, 01 Apr 2007 18:44:48 +0200 by phpDocumentor 1.3.0RC3