original_string: public function setSecurity($security)
  	{
  		if (!is_object($security)) {
  			throw new InvalidArgumentException("Security should be an object");
  		}
  		$dbname = $this->client->getDatabaseName();
  		$raw = $this->client->query(
  				"PUT", "/" . $dbname . "/_security", array(), json_encode($security)
  		);
  		$resp = Couch::parseRawResponse($raw);
  		if ($resp['status_code'] == 200) {
  			return $resp['body'];
  		}
  		throw new CouchException($raw);
  	}
code: public function setSecurity($security)
  	{
  		if (!is_object($security)) {
  			throw new InvalidArgumentException("Security should be an object");
  		}
  		$dbname = $this->client->getDatabaseName();
  		$raw = $this->client->query(
  				"PUT", "/" . $dbname . "/_security", array(), json_encode($security)
  		);
  		$resp = Couch::parseRawResponse($raw);
  		if ($resp['status_code'] == 200) {
  			return $resp['body'];
  		}
  		throw new CouchException($raw);
  	}
code_tokens: public function setSecurity ( $ security ) { if ( ! is_object ( $ security ) ) { throw new InvalidArgumentException ( "Security should be an object" ) ; } $ dbname = $ this -> client -> getDatabaseName ( ) ; $ raw = $ this -> client -> query ( "PUT" , "/" . $ dbname . "/_security" , array ( ) , json_encode ( $ security ) ) ; $ resp = Couch :: parseRawResponse ( $ raw ) ; if ( $ resp [ 'status_code' ] == 200 ) { return $ resp [ 'body' ] ; } throw new CouchException ( $ raw ) ; }
docstring: set the security object of a database
  
  @link http://wiki.apache.org/couchdb/Security_Features_Overview
  @param stdClass $security the security object to apply to the database
  @return stdClass CouchDB server response ( { "ok": true } )
  @throws InvalidArgumentException|CouchException
docstring_tokens: set the security object of a database