Permalink
Browse files

Merge 193bc1b into aef32fd

  • Loading branch information...
exu committed Feb 17, 2017
2 parents aef32fd + 193bc1b commit ed57fa468663f2954071d205e72ceb2737ed513f
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/View.php
View
@@ -203,4 +203,15 @@ public function filter($filter, $arguments = []) {
}
return $this->_filter;
}
public function json($data, $display = true) {
$this->content = json_encode($data);
if ($display) {
header('Content-Type: application/json');
echo $this->content;
} else {
return $this->content;
}
}
}

0 comments on commit ed57fa4

Please sign in to comment.