コード例 #1
0
ファイル: GameQ.php プロジェクト: janedc/steamlug.org
 /**
  * Apply all set filters to the data returned by gameservers.
  *
  * @param GameQ_Protocols $protocol_instance
  * @return array
  */
 protected function filterResponse(GameQ_Protocols $protocol_instance)
 {
     // Let's pull out the "raw" data we are going to filter
     $data = $protocol_instance->processResponse();
     // Loop each of the filters we have attached
     foreach ($this->options['filters'] as $filter_name => $filter_instance) {
         // Overwrite the data with the "filtered" data
         $data = $filter_instance->filter($data, $protocol_instance);
     }
     return $data;
 }