コード例 #1
0
 public static function fromArray($data)
 {
     $settings = new Reports();
     foreach ($data as $key => $value) {
         if (property_exists(get_class($settings), $key)) {
             if (is_array($value)) {
                 if ($key == "reportOptions") {
                     $settings->{$key} = ReportOptions::fromArray($value);
                 }
             } else {
                 $settings->{$key} = $value;
             }
         }
     }
     return $settings;
 }
コード例 #2
0
 /**
  * Using this function you can request the report options for a report.
  *
  * @param string $uri
  * @return Array<\Jasper\ReportOptions>
  */
 public function getReportOptions($uri)
 {
     $url = $this->restUrl2 . '/reports' . $uri . '/options';
     $data = $this->prepAndSend($url, array(200), 'GET', null, true, 'application/json', 'application/json');
     return ReportOptions::createFromJSON($data);
 }