コード例 #1
0
ファイル: Json.php プロジェクト: pombredanne/ArcherSys
 public function renderDataTable($dataTable)
 {
     $result = parent::renderDataTable($dataTable);
     return $this->applyJsonpIfNeeded($result);
 }
コード例 #2
0
 /**
  * @param string $outputFormat
  * @param array $request
  */
 public function __construct($outputFormat, $request = array())
 {
     $this->outputFormat = $outputFormat;
     $this->request = $request;
     $this->apiRenderer = ApiRenderer::factory($outputFormat, $request);
 }
コード例 #3
0
ファイル: ApiRendererTest.php プロジェクト: JoeHorn/piwik
 /**
  * @expectedException \Exception
  * @expectedExceptionMessage General_ExceptionInvalidRendererFormat
  */
 public function test_factory_shouldThrowAnException_IfInvalidFormatGiven()
 {
     ApiRenderer::factory('phpi', array());
 }