-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
81aab71
commit 4541a40
Showing
50 changed files
with
791 additions
and
649 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php declare(strict_types=1); | ||
|
||
// Copyright 2023 The Stellar PHP SDK Authors. All rights reserved. | ||
// Use of this source code is governed by a license that can be | ||
// found in the LICENSE file. | ||
|
||
|
||
namespace Soneso\StellarSDK; | ||
|
||
use Soneso\StellarSDK\Xdr\XdrExtendFootprintTTLOp; | ||
use Soneso\StellarSDK\Xdr\XdrExtensionPoint; | ||
use Soneso\StellarSDK\Xdr\XdrOperationBody; | ||
use Soneso\StellarSDK\Xdr\XdrOperationType; | ||
|
||
|
||
class ExtendFootprintTTLOperation extends AbstractOperation | ||
{ | ||
private int $extendTo; | ||
|
||
/** | ||
* @param int $extendTo | ||
*/ | ||
public function __construct(int $extendTo) | ||
{ | ||
$this->extendTo = $extendTo; | ||
} | ||
|
||
public static function fromXdrOperation(XdrExtendFootprintTTLOp $xdrOp): ExtendFootprintTTLOperation { | ||
return new ExtendFootprintTTLOperation($xdrOp->extendTo); | ||
} | ||
|
||
public function toOperationBody(): XdrOperationBody | ||
{ | ||
$op = new XdrExtendFootprintTTLOp(new XdrExtensionPoint(0), $this->extendTo); | ||
$type = new XdrOperationType(XdrOperationType::EXTEND_FOOTPRINT_TTL); | ||
$result = new XdrOperationBody($type); | ||
$result->setExtendFootprintTTLOp($op); | ||
return $result; | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function getExtendTo(): int | ||
{ | ||
return $this->extendTo; | ||
} | ||
|
||
/** | ||
* @param int $extendTo | ||
*/ | ||
public function setExtendTo(int $extendTo): void | ||
{ | ||
$this->extendTo = $extendTo; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 0 additions & 42 deletions
42
Soneso/StellarSDK/Responses/Operations/BumpFootprintExpirationOperationResponse.php
This file was deleted.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
Soneso/StellarSDK/Responses/Operations/ExtendFootprintTTLOperationResponse.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php declare(strict_types=1); | ||
|
||
// Copyright 2023 The Stellar PHP SDK Authors. All rights reserved. | ||
// Use of this source code is governed by a license that can be | ||
// found in the LICENSE file. | ||
|
||
|
||
namespace Soneso\StellarSDK\Responses\Operations; | ||
|
||
|
||
class ExtendFootprintTTLOperationResponse extends OperationResponse | ||
{ | ||
public string $extendTo; | ||
|
||
protected function loadFromJson(array $json) : void { | ||
if (isset($json['extend_to'])) { | ||
$this->extendTo = $json['extend_to']; | ||
} else if (isset($json['ledgers_to_expire'])) { | ||
$this->extendTo = $json['ledgers_to_expire']; | ||
} | ||
parent::loadFromJson($json); | ||
} | ||
|
||
public static function fromJson(array $jsonData) : ExtendFootprintTTLOperationResponse { | ||
$result = new ExtendFootprintTTLOperationResponse(); | ||
$result->loadFromJson($jsonData); | ||
return $result; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getExtendTo(): string | ||
{ | ||
return $this->extendTo; | ||
} | ||
|
||
/** | ||
* @param string $extendTo | ||
*/ | ||
public function setExtendTo(string $extendTo): void | ||
{ | ||
$this->extendTo = $extendTo; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.