1: <?php
2: /**
3: * Class that can substitute for any object and safely do nothing.
4: *
5: * Copyright 2008-2012 Horde LLC (http://www.horde.org/)
6: *
7: * @category Horde
8: * @package Support
9: * @license http://www.horde.org/licenses/bsd
10: */
11: class Horde_Support_Stub
12: {
13: /**
14: * Cooerce to an empty string
15: *
16: * @return string
17: */
18: public function __toString()
19: {
20: return '';
21: }
22:
23: /**
24: * Return self for any requested property.
25: *
26: * @param string $key The requested object property
27: *
28: * @return null
29: */
30: public function __get($key)
31: {
32: }
33:
34: /**
35: * Gracefully accept any method call and do nothing.
36: *
37: * @param string $method The method that was called
38: * @param array $args The method's arguments
39: *
40: * @return null
41: */
42: public function __call($method, $args)
43: {
44: }
45:
46: /**
47: * Gracefully accept any static method call and do nothing.
48: *
49: * @param string $method The method that was called
50: * @param array $args The method's arguments
51: *
52: * @return null
53: */
54: public static function __callStatic($method, $args)
55: {
56: }
57:
58: }
59: