Skip to content

Commit

Permalink
add implementation independent method to encode value as base64
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Apr 30, 2015
1 parent 819e90c commit f93facd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions class.Eventum_RPC.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ public function setCredentials($username, $password)
$this->client->setCredentials($username, $password);
}

/**
* Implementation independent method to encode value as binary
*
* @param mixed $value
* @return XML_RPC_Value
*/
public function encodeBinary($value) {
return new XML_RPC_Value($value, 'base64');
}

private function getClient()
{
$data = parse_url($this->url);
Expand Down

0 comments on commit f93facd

Please sign in to comment.