Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
 
4
/**
5
 * Keep only the files modified after a given date (or with unknown modification
6
 * date)
7
 *
8
 * PHP versions 4 and 5
9
 *
10
 * This library is free software; you can redistribute it and/or
11
 * modify it under the terms of the GNU Lesser General Public
12
 * License as published by the Free Software Foundation; either
13
 * version 2.1 of the License, or (at your option) any later version.
14
 *
15
 * This library is distributed in the hope that it will be useful,
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18
 * Lesser General Public License for more details.
19
 *
20
 * You should have received a copy of the GNU Lesser General Public
21
 * License along with this library; if not, write to the Free Software
22
 * Foundation, Inc., 59 Temple Place, Suite 330,Boston,MA 02111-1307 USA
23
 *
24
 * @category   File Formats
25
 * @package    File_Archive
26
 * @author     Vincent Lascaux <vincentlascaux@php.net>
27
 * @copyright  1997-2005 The PHP Group
28
 * @license    http://www.gnu.org/copyleft/lesser.html  LGPL
29
 * @version    CVS: $Id: MinTime.php,v 1.6 2005/04/21 10:01:47 vincentlascaux Exp $
30
 * @link       http://pear.php.net/package/File_Archive
31
 */
32
 
33
require_once "File/Archive/Predicate.php";
34
 
35
/**
36
 * Keep only the files modified after a given date (or with unknown modification
37
 * date)
38
 *
39
 * @see        File_Archive_Predicate, File_Archive_Reader_Filter
40
 */
41
class File_Archive_Predicate_MinTime extends File_Archive_Predicate
42
{
43
    var $minTime = 0;
44
 
45
    /**
46
     * @param int $minTime Unix timestamp of the minimal modification date of
47
     *        the files
48
     */
49
    function File_Archive_Predicate_MinTime($minTime)
50
    {
51
        $this->minTime = $minTime;
52
 
53
    }
54
    /**
55
     * @see File_Archive_Predicate::isTrue()
56
     */
57
    function isTrue(&$source)
58
    {
59
        $stat = $source->getStat();
60
        return !isset($stat[9]) || $stat[9]>=$this->minTime;
61
    }
62
}
63
?>