for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Appino\Blockchain\Objects;
use Appino\Blockchain\Objects\Cache;
class WalletAddress{
/**
* @var string
*/
public $label;
public $archived;
public $xpriv;
public $xpub;
* @var array
public $addresslabels;
* @var Cache
public $cahce;
* AccountResponse constructor.
* @param $params array|object
public function __construct($params){
//echo Json::encode($params);
if(is_null($params))
return;
$this->label = data_get($params,'label');
$this->archived = data_get($params,'archived');
$this->xpriv = data_get($params,'xpriv');
$this->xpub = data_get($params,'xpub');
$this->addresslabels = data_get($params,'addresslabels',array());
$this->cahce = new Cache(data_get($params,'cache'));
}
public function __toString(){
$class_vars = get_class_vars(get_class($this));
$response = [];
foreach ($class_vars as $key => $value){
$response[$key] = $this->{$key};
return json_encode($response, JSON_THROW_ON_ERROR) ."";