NCSignatory
in package
implements
JsonSerializable
Uses
TArrayTools
Interfaces, Classes, Traits and Enums
- JsonSerializable
Table of Contents
- SHA256 = 'sha256'
- SHA512 = 'sha512'
- $TYPE_ARRAY : mixed
- $TYPE_BOOLEAN : mixed
- $TYPE_INTEGER : mixed
- $TYPE_NULL : mixed
- $TYPE_SERIALIZABLE : mixed
- $TYPE_STRING : mixed
- $algorithm : string
- $id : string
- $instance : string
- $keyId : string
- $keyOwner : string
- $origData : array<string|int, mixed>
- $privateKey : string
- $publicKey : string
- __construct() : mixed
- NC22Signatory constructor.
- getAlgorithm() : string
- getId() : string
- getInstance() : string
- getKeyId() : string
- getKeyOwner() : string
- getOrigData() : array<string|int, mixed>
- getPrivateKey() : string
- getPublicKey() : string
- hasPrivateKey() : bool
- hasPublicKey() : bool
- import() : $this
- jsonSerialize() : array<string|int, mixed>
- removeFragment() : string
- setAlgorithm() : self
- setId() : self
- setInstance() : self
- setKeyId() : self
- setKeyOwner() : self
- setOrigData() : $this
- /**
- setPrivateKey() : self
- setPublicKey() : self
- typeOf() : string
- validKey() : bool
- cleanArray() : mixed
- extractArray() : mixed
- get() : string
- getArray() : array<string|int, mixed>
- getBool() : bool
- getFloat() : float
- getInt() : int
- getList() : array<string|int, mixed>
- getObj() : mixed
- mustContains() : mixed
Constants
SHA256
public
mixed
SHA256
= 'sha256'
SHA512
public
mixed
SHA512
= 'sha512'
Properties
$TYPE_ARRAY
public
static mixed
$TYPE_ARRAY
= 'Array'
$TYPE_BOOLEAN
public
static mixed
$TYPE_BOOLEAN
= 'Boolean'
$TYPE_INTEGER
public
static mixed
$TYPE_INTEGER
= 'Integer'
$TYPE_NULL
public
static mixed
$TYPE_NULL
= 'Null'
$TYPE_SERIALIZABLE
public
static mixed
$TYPE_SERIALIZABLE
= 'Serializable'
$TYPE_STRING
public
static mixed
$TYPE_STRING
= 'String'
$algorithm
private
string
$algorithm
= self::SHA256
$id
private
string
$id
= ''
$instance
private
string
$instance
= ''
$keyId
private
string
$keyId
= ''
$keyOwner
private
string
$keyOwner
= ''
$origData
private
array<string|int, mixed>
$origData
= []
$privateKey
private
string
$privateKey
= ''
$publicKey
private
string
$publicKey
= ''
Methods
__construct()
NC22Signatory constructor.
public
__construct([string $id = '' ]) : mixed
Parameters
- $id : string = ''
Return values
mixed —getAlgorithm()
public
getAlgorithm() : string
Return values
string —getId()
public
getId() : string
Return values
string —getInstance()
public
getInstance() : string
Return values
string —getKeyId()
public
getKeyId() : string
Return values
string —getKeyOwner()
public
getKeyOwner() : string
Return values
string —getOrigData()
public
getOrigData() : array<string|int, mixed>
Return values
array<string|int, mixed> —getPrivateKey()
public
getPrivateKey() : string
Return values
string —getPublicKey()
public
getPublicKey() : string
Return values
string —hasPrivateKey()
public
hasPrivateKey() : bool
Return values
bool —hasPublicKey()
public
hasPublicKey() : bool
Return values
bool —import()
public
import(array<string|int, mixed> $data) : $this
Parameters
- $data : array<string|int, mixed>
Return values
$this —jsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed> —removeFragment()
public
static removeFragment(string $id) : string
Parameters
- $id : string
Return values
string —setAlgorithm()
public
setAlgorithm(string $algorithm) : self
Parameters
- $algorithm : string
Return values
self —setId()
public
setId(string $id) : self
Parameters
- $id : string
Return values
self —setInstance()
public
setInstance(string $instance) : self
Parameters
- $instance : string
Return values
self —setKeyId()
public
setKeyId(string $keyId) : self
Parameters
- $keyId : string
Return values
self —setKeyOwner()
public
setKeyOwner(string $keyOwner) : self
Parameters
- $keyOwner : string
Return values
self —setOrigData()
/**
public
setOrigData(array<string|int, mixed> $data) : $this
Parameters
- $data : array<string|int, mixed>
Return values
$this —setPrivateKey()
public
setPrivateKey(string $privateKey) : self
Parameters
- $privateKey : string
Return values
self —setPublicKey()
public
setPublicKey(string $publicKey) : self
Parameters
- $publicKey : string
Return values
self —typeOf()
public
typeOf(string $key, array<string|int, mixed> $arr[, bool $root = true ]) : string
Parameters
- $key : string
- $arr : array<string|int, mixed>
- $root : bool = true
Tags
Return values
string —validKey()
public
validKey(string $k, array<string|int, mixed> $arr) : bool
Parameters
- $k : string
- $arr : array<string|int, mixed>
Return values
bool —cleanArray()
protected
cleanArray(array<string|int, mixed> &$arr) : mixed
Parameters
- $arr : array<string|int, mixed>
Return values
mixed —extractArray()
protected
extractArray(string $k, string $value, array<string|int, mixed> $list) : mixed
Parameters
- $k : string
- $value : string
- $list : array<string|int, mixed>
Tags
Return values
mixed —get()
protected
get(string $k, array<string|int, mixed> $arr[, string $default = '' ]) : string
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : string = ''
Return values
string —getArray()
protected
getArray(string $k, array<string|int, mixed> $arr[, array<string|int, mixed> $default = [] ]) : array<string|int, mixed>
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : array<string|int, mixed> = []
Return values
array<string|int, mixed> —getBool()
protected
getBool(string $k, array<string|int, mixed> $arr[, bool $default = false ]) : bool
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : bool = false
Return values
bool —getFloat()
protected
getFloat(string $k, array<string|int, mixed> $arr, float $default) : float
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : float
Return values
float —getInt()
protected
getInt(string $k, array<string|int, mixed> $arr, int $default) : int
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : int
Return values
int —getList()
protected
getList(string $k, array<string|int, mixed> $arr, array<string|int, mixed> $import[, array<string|int, mixed> $default = [] ]) : array<string|int, mixed>
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $import : array<string|int, mixed>
- $default : array<string|int, mixed> = []
Return values
array<string|int, mixed> —getObj()
protected
getObj(string $k, array<string|int, mixed> $arr[, JsonSerializable|null $default = null ]) : mixed
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : JsonSerializable|null = null
Return values
mixed —mustContains()
protected
mustContains(array<string|int, mixed> $keys, array<string|int, mixed> $arr) : mixed
Parameters
- $keys : array<string|int, mixed>
- $arr : array<string|int, mixed>