コード例 #1
0
ファイル: ApiFormatYaml.php プロジェクト: whysasse/kmwiki
 public function execute()
 {
     $this->markDeprecated();
     parent::execute();
 }
コード例 #2
0
ファイル: ApiFormatYaml.php プロジェクト: Tjorriemorrie/app
 public function getDescription()
 {
     return 'Output data in YAML format' . parent::getDescription();
 }
コード例 #3
0
 public function execute()
 {
     if (!$this->getResult()->getResultData('error')) {
         $result = $this->getResult();
         // Ignore warnings or treat as errors, as requested
         $warnings = $result->removeValue('warnings', null);
         if ($this->warningsAsError && $warnings) {
             $this->dieUsage('Warnings cannot be represented in OpenSearch JSON format', 'warnings', 0, ['warnings' => $warnings]);
         }
         // Ignore any other unexpected keys (e.g. from $wgDebugToolbar)
         $remove = array_keys(array_diff_key($result->getResultData(), [0 => 'search', 1 => 'terms', 2 => 'descriptions', 3 => 'urls']));
         foreach ($remove as $key) {
             $result->removeValue($key, null);
         }
     }
     parent::execute();
 }
コード例 #4
0
 public function execute()
 {
     if (!$this->getResult()->getResultData('error')) {
         $warnings = $this->getResult()->removeValue('warnings', null);
         if ($this->warningsAsError && $warnings) {
             $this->dieUsage('Warnings cannot be represented in OpenSearch JSON format', 'warnings', 0, array('warnings' => $warnings));
         }
     }
     parent::execute();
 }