@@ -189,6 +189,9 @@ |
||
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | |
| 192 | + /** |
|
| 193 | + * @param string $value |
|
| 194 | + */ |
|
| 192 | 195 | public function setLanguage($value) { |
| 193 | 196 | if (!empty($value)) |
| 194 | 197 | $this->meta['language'] = strtolower((string)$value); |
@@ -162,6 +162,11 @@ discard block |
||
| 162 | 162 | /* |
| 163 | 163 | * Public API, convert a UUID from one format to another |
| 164 | 164 | */ |
| 165 | + |
|
| 166 | + /** |
|
| 167 | + * @param integer $from |
|
| 168 | + * @param integer $to |
|
| 169 | + */ |
|
| 165 | 170 | static public function convert($uuid, $from, $to) { |
| 166 | 171 | $conv = self::$m_convert[$from][$to]; |
| 167 | 172 | if (!isset($conv)) |
@@ -189,6 +194,11 @@ discard block |
||
| 189 | 194 | /* |
| 190 | 195 | * Generate UUID version 3 and 5 (name based) |
| 191 | 196 | */ |
| 197 | + |
|
| 198 | + /** |
|
| 199 | + * @param string $hash |
|
| 200 | + * @param integer $version |
|
| 201 | + */ |
|
| 192 | 202 | static private function generateName($ns, $node, $hash, $version) { |
| 193 | 203 | $ns_fmt = self::detectFormat($ns); |
| 194 | 204 | $field = self::convert($ns, $ns_fmt, self::FMT_FIELD); |
@@ -54,6 +54,7 @@ |
||
| 54 | 54 | * @brief Converts the given JSON into an array. |
| 55 | 55 | * @param[in] string $json A JSON object. |
| 56 | 56 | * @param[in] bool $assoc When `true`, returned objects will be converted into associative arrays. |
| 57 | + * @param boolean $assoc |
|
| 57 | 58 | * @retval array |
| 58 | 59 | */ |
| 59 | 60 | public static function fromJson($json, $assoc) { |
@@ -266,6 +266,7 @@ discard block |
||
| 266 | 266 | * @param[in] string $path The absolute path of the request. |
| 267 | 267 | * @param[in] string $queryParams (optional) Associative array of query parameters. |
| 268 | 268 | * @param[in] string $headerFields (optional) Associative array of header fields. |
| 269 | + * @param string $path |
|
| 269 | 270 | */ |
| 270 | 271 | public function __construct($method, $path, array $queryParams = NULL, array $headerFields = NULL) { |
| 271 | 272 | parent::__construct(); |
@@ -419,6 +420,8 @@ discard block |
||
| 419 | 420 | * @brief This helper forces request to use the Authorization Basic mode. |
| 420 | 421 | * @param[in] string $userName User name. |
| 421 | 422 | * @param[in] string $password Password. |
| 423 | + * @param string $userName |
|
| 424 | + * @param string $password |
|
| 422 | 425 | */ |
| 423 | 426 | public function setBasicAuth($userName, $password) { |
| 424 | 427 | $this->setHeaderField(self::AUTHORIZATION_HF, "Basic ".base64_encode("$userName:$password")); |
@@ -908,7 +908,7 @@ |
||
| 908 | 908 | * @see http://docs.couchdb.org/en/latest/api/server/common.html#post--_replicate |
| 909 | 909 | */ |
| 910 | 910 | public function startReplication($sourceDbUrl, $targetDbUrl, $proxy = NULL, $createTargetDb = TRUE, |
| 911 | - $continuous = FALSE, $filter = NULL, Opt\ViewQueryOpts $opts = NULL) { |
|
| 911 | + $continuous = FALSE, $filter = NULL, Opt\ViewQueryOpts $opts = NULL) { |
|
| 912 | 912 | // Sets source and target databases. |
| 913 | 913 | if (is_string($sourceDbUrl) && !empty($sourceDbUrl) && |
| 914 | 914 | is_string($targetDbUrl) && !empty($targetDbUrl)) { |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | * configurations.\n |
| 18 | 18 | * Inherit from LocalDoc if you want create a persistent class that is not replicable. |
| 19 | 19 | * @nosubgrouping |
| 20 | - */ |
|
| 20 | + */ |
|
| 21 | 21 | class LocalDoc extends AbstractDoc { |
| 22 | 22 | |
| 23 | 23 | |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | /** |
| 48 | 48 | * @copydoc AbstractAdapter::__construct() |
| 49 | 49 | * @param[in] bool $persistent (optional) When `true` the client uses a persistent connection. |
| 50 | - */ |
|
| 50 | + */ |
|
| 51 | 51 | public function __construct($server = parent::DEFAULT_SERVER, $userName = "", $password = "", $persistent = TRUE) { |
| 52 | 52 | $this->initialize(); |
| 53 | 53 | |