shimabox/SMBArrayto

View on GitHub
src/SMB/Arrayto/Plugins/Json/Outputter.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace SMB\Arrayto\Plugins\Json;

use SMB\Arrayto\Interfaces\Outputable;
use SMB\Arrayto\Traits;

/**
 * Outputter of Json format
 *
 * @author shimabox.net
 */
class Outputter implements Outputable
{
    use Traits\Json\Configurable, Traits\Storable /* know $this->rows */;

    /**
     * output
     */
    public function output()
    {
        header('Content-Type: application/json; charset=utf-8');
        echo json_encode($this->rows, $this->jsonEncodeOption);
    }
}