1: <?php
2: /**
3: * Horde_Pear_Package_Contents_Ignore_Hidden:: ignores hidden files.
4: *
5: * PHP version 5
6: *
7: * @category Horde
8: * @package Pear
9: * @author Gunnar Wrobel <wrobel@pardus.de>
10: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
11: * @link http://pear.horde.org/index.php?package=Pear
12: */
13:
14: /**
15: * Horde_Pear_Package_Contents_Ignore_Hidden:: ignores hidden files.
16: *
17: * Copyright 2011-2012 Horde LLC (http://www.horde.org/)
18: *
19: * See the enclosed file COPYING for license information (LGPL). If you
20: * did not receive this file, see http://www.horde.org/licenses/lgpl21.
21: *
22: * @category Horde
23: * @package Pear
24: * @author Gunnar Wrobel <wrobel@pardus.de>
25: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
26: * @link http://pear.horde.org/index.php?package=Pear
27: */
28: class Horde_Pear_Package_Contents_Ignore_Hidden
29: implements Horde_Pear_Package_Contents_Ignore
30: {
31: /**
32: * Tell whether to ignore the element.
33: *
34: * @param SplFileInfo $element The element to check.
35: *
36: * @return bool True if the element should be ignored, false otherwise.
37: */
38: public function isIgnored(SplFileInfo $element)
39: {
40: return strpos($element->getFilename(), '.') === 0;
41: }
42: }