first commit
This commit is contained in:
29
lib/Auth/SignerFactory.php
Normal file
29
lib/Auth/SignerFactory.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Yeepay\Yop\Sdk\Auth;
|
||||
|
||||
use Yeepay\Yop\Sdk\Auth\Signer\RsaSigner;
|
||||
|
||||
class SignerFactory
|
||||
{
|
||||
|
||||
private static $signers = [];
|
||||
|
||||
public static function init()
|
||||
{
|
||||
self::$signers['RSA'] = new RsaSigner();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $signerType string
|
||||
* @return Signer
|
||||
*/
|
||||
public static function getSigner($signerType)
|
||||
{
|
||||
return self::$signers[$signerType];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SignerFactory::init();
|
||||
|
||||
Reference in New Issue
Block a user