1: <?php
2: /**
3: * A Horde_Injector:: based Horde_Editor:: factory.
4: *
5: * PHP version 5
6: *
7: * @category Horde
8: * @package Core
9: * @author Michael Slusarz <slusarz@horde.org>
10: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
11: * @link http://pear.horde.org/index.php?package=Core
12: */
13:
14: /**
15: * A Horde_Injector:: based Horde_Editor:: factory.
16: *
17: * Copyright 2010-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 Core
24: * @author Michael Slusarz <slusarz@horde.org>
25: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
26: * @link http://pear.horde.org/index.php?package=Core
27: */
28: class Horde_Core_Factory_Editor extends Horde_Core_Factory_Injector
29: {
30: /**
31: * Return the Horde_Editor:: instance.
32: *
33: * @param string $driver The editor driver.
34: * @param array $params Additional parameters to pass to the driver
35: * (will override Horde defaults).
36: *
37: * @return Horde_Editor The singleton editor instance.
38: * @throws Horde_Editor_Exception
39: */
40: public function create(Horde_Injector $injector)
41: {
42: return $injector->getInstance('Horde_Editor_Ckeditor');
43: }
44: }
45: