1<?php
2/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
4/**
5 * A predicate is an object that can evaluate to true or false depending on the
6 * file currently read by a File_Archive_Reader
7 *
8 * @see File_Archive_Reader_Filter
9 *
10 * PHP versions 4 and 5
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20 * Lesser General Public License for more details.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330,Boston,MA 02111-1307 USA
25 *
26 * @category   File Formats
27 * @package    File_Archive
28 * @author     Vincent Lascaux <vincentlascaux@php.net>
29 * @copyright  1997-2005 The PHP Group
30 * @license    http://www.gnu.org/copyleft/lesser.html  LGPL
31 * @version    CVS: $Id: Predicate.php,v 1.7 2005/05/26 21:30:18 vincentlascaux Exp $
32 * @link       http://pear.php.net/package/File_Archive
33 */
34
35require_once "File/Archive/Reader.php";
36
37/**
38 * A predicate is an object that can evaluate to true or false depending on the
39 * file currently read by a File_Archive_Reader
40 *
41 * @see File_Archive_Reader_Filter
42 */
43class File_Archive_Predicate
44{
45    /**
46     * Indicates whether the current file from the reader should be kept
47     *
48     * @param File_Archive_Reader $source Reader which will be filtered
49     * @return bool False iif the current file must be filtered out
50     */
51    function isTrue(&$source)
52    {
53        return PEAR::raiseError("Predicat abstract function call");
54    }
55}
56
57?>