protected function _filterSubjects($state, $subjects, $frame, $flags) {
    $rval = new stdClass();
    sort($subjects);
    foreach($subjects as $id) {
      $subject = $state->subjects->{$id};
      if($this->_filterSubject($subject, $frame, $flags)) {
        $rval->{$id} = $subject;
      }
    }
    return $rval;
  }