original_string: protected function get_expected_data($expected, $postdata, $extraprefix) {
          $submitteddata = array();
          foreach ($expected as $name => $type) {
              $value = $this->get_submitted_var(
                      $this->get_field_prefix() . $extraprefix . $name, $type, $postdata);
              if (!is_null($value)) {
                  $submitteddata[$extraprefix . $name] = $value;
              }
          }
          return $submitteddata;
      }
code: protected function get_expected_data($expected, $postdata, $extraprefix) {
          $submitteddata = array();
          foreach ($expected as $name => $type) {
              $value = $this->get_submitted_var(
                      $this->get_field_prefix() . $extraprefix . $name, $type, $postdata);
              if (!is_null($value)) {
                  $submitteddata[$extraprefix . $name] = $value;
              }
          }
          return $submitteddata;
      }
code_tokens: protected function get_expected_data ( $ expected , $ postdata , $ extraprefix ) { $ submitteddata = array ( ) ; foreach ( $ expected as $ name => $ type ) { $ value = $ this -> get_submitted_var ( $ this -> get_field_prefix ( ) . $ extraprefix . $ name , $ type , $ postdata ) ; if ( ! is_null ( $ value ) ) { $ submitteddata [ $ extraprefix . $ name ] = $ value ; } } return $ submitteddata ; }
docstring: Get any data from the request that matches the list of expected params.
  
  @param array $expected variable name => PARAM_... constant.
  @param null|array $postdata null to use real post data, otherwise an array of data to use.
  @param string $extraprefix '-' or ''.
  @return array name => value.
docstring_tokens: Get any data from the request that matches the list of expected params .