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;
    }
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;
    }
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 ; }
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.
Get any data from the request that matches the list of expected params .