Skip to content

Commit

Permalink
Removal of underscored classnames for legacy autoloader compat
Browse files Browse the repository at this point in the history
  • Loading branch information
calcinai committed Jan 27, 2015
1 parent e0e6dc5 commit 10409e4
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
24 changes: 24 additions & 0 deletions examples/private.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

use XeroPHP\Application\PrivateApplication;

//These are the minimum settings - for more options, refer to examples/config.php
$config = array(
'oauth' => array(
'callback' => 'oob',

'consumer_key' => 'k',
'consumer_secret' => 's',

'rsa_private_key' => 'file://certs/private.pem',
'rsa_public_key' => 'file://certs/public.pem'

)
);


$xero = new PrivateApplication($config);


print_r($xero->loadByGUID('Accounting\\Contact', '[GUID]'));

8 changes: 4 additions & 4 deletions src/XeroPHP/Remote/OAuth/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

use XeroPHP\Exception;
use XeroPHP\Helpers;
use XeroPHP\Remote\OAuth\SignatureMethod\RSA_SHA1;
use XeroPHP\Remote\OAuth\SignatureMethod\HMAC_SHA1;
use XeroPHP\Remote\OAuth\SignatureMethod\RSASHA1;
use XeroPHP\Remote\OAuth\SignatureMethod\HMACSHA1;
use XeroPHP\Remote\OAuth\SignatureMethod\PLAINTEXT;
use XeroPHP\Remote\Request;

Expand Down Expand Up @@ -128,10 +128,10 @@ private function getSignature(){

switch ($this->getSignatureMethod()) {
case self::SIGNATURE_RSA_SHA1:
$signature = RSA_SHA1::generateSignature($this->config, $this->getSBS(), $this->getSigningSecret());
$signature = RSASHA1::generateSignature($this->config, $this->getSBS(), $this->getSigningSecret());
break;
case self::SIGNATURE_HMAC_SHA1:
$signature = HMAC_SHA1::generateSignature($this->config, $this->getSBS(), $this->getSigningSecret());
$signature = HMACSHA1::generateSignature($this->config, $this->getSBS(), $this->getSigningSecret());
break;
case self::SIGNATURE_PLAINTEXT:
$signature = PLAINTEXT::generateSignature($this->config, $this->getSBS(), $this->getSigningSecret());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use XeroPHP\Remote\OAuth\Exception;

class HMAC_SHA1 implements SignatureMethodInterface {
class HMACSHA1 implements SignatureMethodInterface {

public static function generateSignature(array $config, $sbs, $secret){

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use XeroPHP\Remote\OAuth\Exception;

class RSA_SHA1 implements SignatureMethodInterface {
class RSASHA1 implements SignatureMethodInterface {


public static function generateSignature(array $config, $sbs, $secret){
Expand Down

0 comments on commit 10409e4

Please sign in to comment.