1: <?php
2: /**
3: * Horde_Service_Twitter_Auth_* classes to abstract all auth related tasks for
4: * various auth mechanisms.
5: *
6: * Copyright 2009-2012 Horde LLC (http://www.horde.org/)
7: *
8: * @author Michael J. Rubinsky <mrubinsk@horde.org>
9: * @license http://www.horde.org/licenses/bsd BSD
10: * @category Horde
11: * @package Service_Twitter
12: */
13: abstract class Horde_Service_Twitter_Auth
14: {
15: /**
16: *
17: * @var Horde_Service_Twitter
18: */
19: protected $_twitter;
20:
21: /**
22: * Configuration parameters
23: *
24: * @param array
25: */
26: protected $_config;
27:
28:
29: public function setTwitter(Horde_Service_Twitter $twitter)
30: {
31: $this->_twitter = $twitter;
32: }
33:
34: /**
35: * Getter
36: *
37: * @param string $value
38: *
39: * @return mixed The value of the requested property.
40: * @throws Horde_Service_Twitter_Exception
41: */
42: public function __get($value)
43: {
44: if (!empty($this->_config[$value])) {
45: return $this->_config[$value];
46: }
47:
48: throw new Horde_Service_Twitter_Exception(sprintf("The property %s does not exist", $value));
49: }
50:
51: }
52: