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
Showing
5 changed files
with
83 additions
and
2 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 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,25 @@ | ||
<?php | ||
|
||
namespace Piggly\ApiClient\Interfaces; | ||
|
||
/** | ||
* Object that can be converted to array. | ||
* | ||
* @since 2.1.1 | ||
* @category Interfaces | ||
* @package Piggly\ApiClient | ||
* @subpackage Piggly\ApiClient\Interfaces | ||
* @author Caique Araujo <caique@piggly.com.br> | ||
* @author Piggly Lab <dev@piggly.com.br> | ||
* @copyright 2023 Piggly Lab | ||
*/ | ||
interface Arrayable | ||
{ | ||
/** | ||
* Convert object to array. | ||
* | ||
* @return array | ||
* @since 2.1.1 | ||
*/ | ||
public function toArray(): array; | ||
} |
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,26 @@ | ||
<?php | ||
|
||
namespace Pgly\PagarMe\Api\Interfaces; | ||
|
||
/** | ||
* Object that can be imported from an array. | ||
* | ||
* @since 2.1.1 | ||
* @category Interfaces | ||
* @package Piggly\ApiClient | ||
* @subpackage Piggly\ApiClient\Interfaces | ||
* @author Caique Araujo <caique@piggly.com.br> | ||
* @author Piggly Lab <dev@piggly.com.br> | ||
* @copyright 2023 Piggly Lab | ||
*/ | ||
interface Importable | ||
{ | ||
/** | ||
* Import data from an array. | ||
* | ||
* @param array $data | ||
* @return mixed | ||
* @since 2.1.1 | ||
*/ | ||
public static function import(array $data); | ||
} |
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,26 @@ | ||
<?php | ||
|
||
namespace Piggly\ApiClient\Interfaces; | ||
|
||
/** | ||
* Object that can be converted to array. | ||
* | ||
* @since 2.1.1 | ||
* @category Interfaces | ||
* @package Piggly\ApiClient | ||
* @subpackage Piggly\ApiClient\Interfaces | ||
* @author Caique Araujo <caique@piggly.com.br> | ||
* @author Piggly Lab <dev@piggly.com.br> | ||
* @copyright 2023 Piggly Lab | ||
*/ | ||
interface SensitiveDataArrayable | ||
{ | ||
/** | ||
* Convert object to a censored array. | ||
* It must hide sensitive data. | ||
* | ||
* @return array | ||
* @since 2.1.1 | ||
*/ | ||
public function toCensoredArray(): array; | ||
} |