Рекурсивный акроним словосочетания «PHP: Hypertext Preprocessor»
Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 17202 программиста и 1833 робота. Сейчас ищут 1696 программистов ...
File_Fortune::getAll
Вернуться к: File_Fortune
File_Fortune::getAll
File_Fortune::getAll() – Retrieve all fortunes from the current file
Synopsis
require_once 'File/Fortune.php';
array File_Fortune::getAll ( )
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