1: <?php
2: /**
3: * Class for providing a generic UI for any VFS instance.
4: *
5: * Copyright 2002-2012 Horde LLC (http://www.horde.org/)
6: *
7: * See the enclosed file COPYING for license information (LGPL). If you
8: * did not receive this file, see http://www.horde.org/licenses/lgpl21.
9: *
10: * @author Chuck Hagenbuch <chuck@horde.org>
11: * @package Vfs
12: */
13: class Horde_Vfs_Browser
14: {
15: /**
16: * The VFS instance that we are browsing.
17: *
18: * @var VFS
19: */
20: protected $_vfs;
21:
22: /**
23: * The directory where the templates to use are.
24: *
25: * @var string
26: */
27: protected $_templates;
28:
29: /**
30: * Constructor
31: *
32: * @param VFS $vfs A VFS object.
33: * @param string $templates Template directory.
34: */
35: public function __construct($vfs, $templates)
36: {
37: $this->setVFSObject($vfs);
38: $this->_templates = $templates;
39: }
40:
41: /**
42: * Set the VFS object in the local object.
43: *
44: * @param VFS $vfs A VFS object.
45: */
46: public function setVFSObject($vfs)
47: {
48: $this->_vfs = $vfs;
49: }
50:
51: /**
52: * TODO
53: *
54: * @param string $path TODO
55: * @param boolean $dotfiles TODO
56: * @param boolean $dironly TODO
57: *
58: * @throws Horde_Vfs_Exception
59: */
60: public function getUI($path, $dotfiles = false, $dironly = false)
61: {
62: $this->_vfs->listFolder($path, $dotfiles, $dironly);
63: }
64:
65: }
66: