@@ -542,7 +542,7 @@ |
||
| 542 | 542 | * Get the UID of the connected user, or 0 |
| 543 | 543 | * if the Facebook user is not connected. |
| 544 | 544 | * |
| 545 | - * @return string the UID if available. |
|
| 545 | + * @return integer the UID if available. |
|
| 546 | 546 | */ |
| 547 | 547 | public function getUser() { |
| 548 | 548 | if ($this->user !== null) { |
@@ -27,6 +27,9 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | private static $kExpiredAccessToken = 'AAABrFmeaJjgBAIshbq5ZBqZBICsmveZCZBi6O4w9HSTkFI73VMtmkL9jLuWsZBZC9QMHvJFtSulZAqonZBRIByzGooCZC8DWr0t1M4BL9FARdQwPWPnIqCiFQ'; |
| 29 | 29 | |
| 30 | + /** |
|
| 31 | + * @param string $oauth_token |
|
| 32 | + */ |
|
| 30 | 33 | private static function kValidSignedRequest($id = self::TEST_USER, $oauth_token = null) { |
| 31 | 34 | $facebook = new FBPublic(array( |
| 32 | 35 | 'appId' => self::APP_ID, |
@@ -1928,7 +1931,6 @@ discard block |
||
| 1928 | 1931 | * Checks that the correct args are a subset of the returned obj |
| 1929 | 1932 | * @param array $correct The correct array values |
| 1930 | 1933 | * @param array $actual The values in practice |
| 1931 | - * @param string $message to be shown on failure |
|
| 1932 | 1934 | */ |
| 1933 | 1935 | protected function assertIsSubset($correct, $actual, $msg='') { |
| 1934 | 1936 | foreach ($correct as $key => $value) { |
@@ -1975,18 +1977,33 @@ discard block |
||
| 1975 | 1977 | return $this->requests; |
| 1976 | 1978 | } |
| 1977 | 1979 | |
| 1980 | + /** |
|
| 1981 | + * @param string $access_token |
|
| 1982 | + */ |
|
| 1978 | 1983 | public function publicGetAppSecretProof($access_token) { |
| 1979 | 1984 | return $this->getAppSecretProof($access_token); |
| 1980 | 1985 | } |
| 1981 | 1986 | } |
| 1982 | 1987 | |
| 1983 | 1988 | class FBPublic extends TransientFacebook { |
| 1989 | + |
|
| 1990 | + /** |
|
| 1991 | + * @param string $input |
|
| 1992 | + */ |
|
| 1984 | 1993 | public static function publicBase64UrlDecode($input) { |
| 1985 | 1994 | return self::base64UrlDecode($input); |
| 1986 | 1995 | } |
| 1996 | + |
|
| 1997 | + /** |
|
| 1998 | + * @param string $input |
|
| 1999 | + */ |
|
| 1987 | 2000 | public static function publicBase64UrlEncode($input) { |
| 1988 | 2001 | return self::base64UrlEncode($input); |
| 1989 | 2002 | } |
| 2003 | + |
|
| 2004 | + /** |
|
| 2005 | + * @param string $input |
|
| 2006 | + */ |
|
| 1990 | 2007 | public function publicParseSignedRequest($input) { |
| 1991 | 2008 | return $this->parseSignedRequest($input); |
| 1992 | 2009 | } |
@@ -2000,14 +2017,23 @@ discard block |
||
| 2000 | 2017 | return $this->parseSignedRequest($input); |
| 2001 | 2018 | } |
| 2002 | 2019 | |
| 2020 | + /** |
|
| 2021 | + * @param string $key |
|
| 2022 | + */ |
|
| 2003 | 2023 | public function publicSetPersistentData($key, $value) { |
| 2004 | 2024 | $this->setPersistentData($key, $value); |
| 2005 | 2025 | } |
| 2006 | 2026 | |
| 2027 | + /** |
|
| 2028 | + * @param string $key |
|
| 2029 | + */ |
|
| 2007 | 2030 | public function publicGetPersistentData($key, $default = false) { |
| 2008 | 2031 | return $this->getPersistentData($key, $default); |
| 2009 | 2032 | } |
| 2010 | 2033 | |
| 2034 | + /** |
|
| 2035 | + * @param string $key |
|
| 2036 | + */ |
|
| 2011 | 2037 | public function publicClearPersistentData($key) { |
| 2012 | 2038 | return $this->clearPersistentData($key); |
| 2013 | 2039 | } |
@@ -197,6 +197,12 @@ discard block |
||
| 197 | 197 | // (1) do a lookup in a table of trusted certs keyed off of consumer |
| 198 | 198 | // |
| 199 | 199 | // Either way should return a string representation of the certificate |
| 200 | + |
|
| 201 | + /** |
|
| 202 | + * @param OAuthRequest $request |
|
| 203 | + * |
|
| 204 | + * @return string |
|
| 205 | + */ |
|
| 200 | 206 | protected abstract function fetch_private_cert(&$request); |
| 201 | 207 | |
| 202 | 208 | public function build_signature($request, $consumer, $token) |
@@ -331,6 +337,9 @@ discard block |
||
| 331 | 337 | return new OAuthRequest($http_method, $http_url, $parameters); |
| 332 | 338 | } |
| 333 | 339 | |
| 340 | + /** |
|
| 341 | + * @param string $name |
|
| 342 | + */ |
|
| 334 | 343 | public function set_parameter($name, $value, $allow_duplicates = true) |
| 335 | 344 | { |
| 336 | 345 | if ($allow_duplicates && isset($this->parameters[$name])) { |
@@ -55,6 +55,8 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * construct TwitterOAuth object |
| 58 | + * @param string $consumer_key |
|
| 59 | + * @param string $consumer_secret |
|
| 58 | 60 | */ |
| 59 | 61 | function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) { |
| 60 | 62 | $this->sha1_method = new OAuthSignatureMethod_HMAC_SHA1(); |
@@ -71,6 +73,7 @@ discard block |
||
| 71 | 73 | * Get a request_token from Twitter |
| 72 | 74 | * |
| 73 | 75 | * @returns a key/value array containing oauth_token and oauth_token_secret |
| 76 | + * @param string $oauth_callback |
|
| 74 | 77 | */ |
| 75 | 78 | function getRequestToken($oauth_callback) { |
| 76 | 79 | $parameters = array(); |
@@ -170,6 +173,7 @@ discard block |
||
| 170 | 173 | |
| 171 | 174 | /** |
| 172 | 175 | * Format and sign an OAuth / API request |
| 176 | + * @param string $method |
|
| 173 | 177 | */ |
| 174 | 178 | function oAuthRequest($url, $method, $parameters) { |
| 175 | 179 | if (strrpos($url, 'https://') !== 0 && strrpos($url, 'http://') !== 0) { |
@@ -188,6 +192,7 @@ discard block |
||
| 188 | 192 | /** |
| 189 | 193 | * Make an HTTP request |
| 190 | 194 | * |
| 195 | + * @param string $postfields |
|
| 191 | 196 | * @return API results |
| 192 | 197 | */ |
| 193 | 198 | function http($url, $method, $postfields = NULL) { |
@@ -13,6 +13,9 @@ |
||
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | |
| 16 | +/** |
|
| 17 | + * @param integer $limit |
|
| 18 | + */ |
|
| 16 | 19 | function format_feed_tweets($db, $array, $limit) |
| 17 | 20 | { |
| 18 | 21 | |
@@ -102,6 +102,9 @@ discard block |
||
| 102 | 102 | } |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | + /** |
|
| 106 | + * @param string $template_file |
|
| 107 | + */ |
|
| 105 | 108 | function setTemplateFile($template_file) |
| 106 | 109 | { |
| 107 | 110 | $this->template_file = $template_file; |
@@ -271,6 +274,10 @@ discard block |
||
| 271 | 274 | } |
| 272 | 275 | |
| 273 | 276 | //saves overrides for defs |
| 277 | + |
|
| 278 | + /** |
|
| 279 | + * @param string $subsection |
|
| 280 | + */ |
|
| 274 | 281 | function saveSubPanelDefOverride( $panel, $subsection, $override){ |
| 275 | 282 | global $layout_defs, $beanList; |
| 276 | 283 | |
@@ -406,6 +413,9 @@ discard block |
||
| 406 | 413 | return print_r($where_clauses,true); |
| 407 | 414 | } |
| 408 | 415 | |
| 416 | + /** |
|
| 417 | + * @param string $module |
|
| 418 | + */ |
|
| 409 | 419 | function get_searchdefs($module) |
| 410 | 420 | { |
| 411 | 421 | $thisPanel =& $this->subpanel_defs; |
@@ -417,11 +417,19 @@ |
||
| 417 | 417 | } |
| 418 | 418 | |
| 419 | 419 | //get value of a property defined at the panel instance level. |
| 420 | + |
|
| 421 | + /** |
|
| 422 | + * @param string $name |
|
| 423 | + */ |
|
| 420 | 424 | function get_inst_prop_value ( $name ) |
| 421 | 425 | { |
| 422 | 426 | return isset($this->_instance_properties[$name]) ? $this->_instance_properties [ $name ] : null; |
| 423 | 427 | } |
| 424 | 428 | //get value of a property defined at the panel definition level. |
| 429 | + |
|
| 430 | + /** |
|
| 431 | + * @param string $name |
|
| 432 | + */ |
|
| 425 | 433 | function get_def_prop_value ( $name ) |
| 426 | 434 | { |
| 427 | 435 | if (isset ( $this->panel_definition [ $name ] )) |
@@ -11,6 +11,11 @@ |
||
| 11 | 11 | |
| 12 | 12 | var $subPanel; // the instantiated bean of the subPanel |
| 13 | 13 | |
| 14 | + /** |
|
| 15 | + * @param Meeting $seed |
|
| 16 | + * @param string $module |
|
| 17 | + * @param SubPanel $subPanel |
|
| 18 | + */ |
|
| 14 | 19 | function SubPanelSearchForm($seed, $module, $subPanel, $options = array()){ |
| 15 | 20 | $this->subPanel = $subPanel; |
| 16 | 21 | parent::SearchForm($seed, $module, 'DetailView', $options); |
@@ -167,6 +167,7 @@ discard block |
||
| 167 | 167 | * |
| 168 | 168 | * @param String $key -- Global namespace cache. Key for the data. |
| 169 | 169 | * @param Serializable $value -- The value to store in the cache. |
| 170 | + * @param integer $ttl |
|
| 170 | 171 | */ |
| 171 | 172 | function sugar_cache_put($key, $value, $ttl = null) |
| 172 | 173 | { |
@@ -228,7 +229,7 @@ discard block |
||
| 228 | 229 | * |
| 229 | 230 | * @deprecated |
| 230 | 231 | * |
| 231 | - * @return true for success, false for failure. |
|
| 232 | + * @return boolean for success, false for failure. |
|
| 232 | 233 | */ |
| 233 | 234 | function sugar_cache_validate() |
| 234 | 235 | { |