芝麻web文件管理V1.00
编辑当前文件:/home/strato/chroot/opt/RZphp5/includes/File/Archive/Predicate/Index.php
* @copyright 1997-2005 The PHP Group * @license http://www.gnu.org/copyleft/lesser.html LGPL * @version CVS: $Id: Index.php,v 1.1 2005/05/30 19:44:53 vincentlascaux Exp $ * @link http://pear.php.net/package/File_Archive */ require_once "File/Archive/Predicate.php"; /** * Evaluates to true if the index is in a given array of indexes * The array has the indexes in key (so you may want to call * array_flip if your array has indexes as value) */ class File_Archive_Predicate_Index extends File_Archive_Predicate { var $indexes; var $pos = 0; /** * @param $extensions array or comma separated string of allowed extensions */ function File_Archive_Predicate_Index($indexes) { $this->indexes = $indexes; } /** * @see File_Archive_Predicate::isTrue() */ function isTrue(&$source) { return isset($this->indexes[$this->pos++]); } } ?>