1: <?php
2: /**
3: * A Horde_Injector:: based Horde_Core_Share_Driver:: factory.
4: *
5: * @category Horde
6: * @package Core
7: * @author Michael J. Rubinsky <mrubinsk@horde.org>
8: */
9:
10: /**
11: * A Horde_Injector:: based Horde_Share factory.
12: *
13: * Copyright 2010-2012 Horde LLC (http://www.horde.org/)
14: *
15: * See the enclosed file COPYING for license information (LGPL). If you
16: * did not receive this file, see http://www.horde.org/licenses/lgpl21.
17: *
18: * @category Horde
19: * @package Core
20: * @author Michael J. Rubinsky <mrubinsk@horde.org>
21: */
22: class Horde_Core_Factory_Share extends Horde_Core_Factory_Base
23: {
24: /**
25: * Returns the Horde_Share_Base instance.
26: *
27: * @param string $app The application scope to use, if not the current
28: * app.
29: * @param string $driver The share driver. Either empty (use default
30: * driver from $conf) or a driver name.
31: *
32: * @return Horde_Core_Share_Driver The Horde_Share instance.
33: * @throws Horde_Exception
34: */
35: public function create($app = null, $driver = null)
36: {
37: return new Horde_Core_Share_Driver($this->_injector->getInstance('Horde_Core_Factory_ShareBase')->create($app, $driver));
38: }
39:
40: }
41: