firstcommit

This commit is contained in:
2018-06-21 17:59:40 +02:00
commit 967f6c0e3e
3205 changed files with 360012 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace League\CLImate\TerminalObject\Basic;
class Json extends BasicTerminalObject
{
/**
* The data to convert to JSON
*
* @var mixed $data
*/
protected $data;
public function __construct($data)
{
$this->data = $data;
}
/**
* Return the data as JSON
*
* @return string
*/
public function result()
{
return json_encode($this->data, JSON_PRETTY_PRINT);
}
}