Beispiel #1
0
 public function execute(ActionResultContext $context)
 {
     $result = new ContentResult(json_encode($this->data), 'application/json');
     return $result->execute($context);
 }
Beispiel #2
0
 /**
  * @param array $json data to be presented in JSON
  */
 function __construct(array $json)
 {
     parent::__construct(json_encode($json));
 }