1 | <?php |
||
28 | class Configuration extends Nette\Object |
||
29 | { |
||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | public $consumerKey; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | public $consumerSecret; |
||
39 | |||
40 | /** |
||
41 | * @var array |
||
42 | */ |
||
43 | public $domains = [ |
||
44 | 'oauth' => 'https://api.twitter.com/oauth/', |
||
45 | 'api' => 'https://api.twitter.com/1.1/', |
||
46 | 'upload' => 'https://upload.twitter.com/1.1/', |
||
47 | ]; |
||
48 | |||
49 | /** |
||
50 | * @param string $consumerKey |
||
51 | * @param string $consumerSecret |
||
52 | */ |
||
53 | public function __construct($consumerKey, $consumerSecret) |
||
58 | |||
59 | /** |
||
60 | * Build the URL for given domain alias, path and parameters. |
||
61 | * |
||
62 | * @param string $name The name of the domain |
||
63 | * @param string $path Optional path (without a leading slash) |
||
64 | * @param array $params Optional query parameters |
||
65 | * |
||
66 | * @return Http\UrlScript The URL for the given parameters |
||
67 | */ |
||
68 | public function createUrl($name, $path = NULL, $params = []) |
||
85 | } |