forked from jc21/clitable
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from davemednick/mobetta.stuff
Mobetta.stuff
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
/** | ||
* NocWorx Datacenter Management Suite | ||
* | ||
* @package nocworx.clitable | ||
* @copyright 2006-2022 LiquidWeb, LLC | ||
* @license Proprietary | ||
*/ | ||
|
||
declare(strict_types = 1); | ||
|
||
namespace jc21; | ||
|
||
/** | ||
* Custom manipulators for the Cli Table class | ||
*/ | ||
class CliTableCustomManipulators extends CliTableManipulator | ||
{ | ||
/** | ||
* Convert this data into a json string | ||
* | ||
* @param array $data | ||
* @return string | ||
*/ | ||
public function jsonify(array $data): string | ||
{ | ||
return json_encode($data, JSON_PRETTY_PRINT); | ||
} | ||
} |