Process POST data.

\reimp
558726
function processPostData()
    {
        if ( $this->Http->hasPostVariable( 'UploadPackageButton' ) )
        {
            $this->uploadPackage();
            return false; // force displaying the same step.
        }

        if ( !$this->Http->hasPostVariable( 'eZSetup_site_type' ) )
        {
            $this->ErrorMsg = ezpI18n::tr( 'design/standard/setup/init',
                                      'No site package chosen.' );
            return false;
        }

        $sitePackageInfo = $this->Http->postVariable( 'eZSetup_site_type' );
        $downloaded = false; // true - if $sitePackageName package has been downloaded.
        if ( preg_match( '/^(\w+)\|(.+)$/', $sitePackageInfo, $matches ) )
        {
            // remote site package chosen: download it.
            $sitePackageName = $matches[1];
            $sitePackageURL  = $matches[2];

            // we already know that we should download the package anyway as it has newer version
            // so use force download mode
            $package = $this->downloadAndImportPackage( $sitePackageName, $sitePackageURL, true );
            if ( is_object( $package ) )
            {
                $downloaded = true;
                $this->Message = ezpI18n::tr( 'design/standard/setup/init', 'Package \'%packageName\' and it\'s dependencies have been downloaded successfully. Press \'Next\' to continue.', false, array( '%packageName' => $sitePackageName ) );
            }
        }
        else
        {
            // local (already imported) site package chosen: just fetch it.
            $sitePackageName = $sitePackageInfo;

            $package = eZPackage::fetch( $sitePackageName, false, false, false );
            $this->ErrorMsg = ezpI18n::tr( 'design/standard/setup/init', 'Invalid package' ) . '.';
        }

        // Verify package.
        if ( !is_object( $package ) || !$this->selectSiteType( $sitePackageName ) )
            return false;

        // Download packages that the site package requires.
        $downloadDependandPackagesResult = $this->downloadDependantPackages( $package );
        return $downloadDependandPackagesResult == false ? false : !$downloaded;
    }
167244
def prepare_post_parameters(self, post_params=None, files=None):
        
        params = []

        if post_params:
            params = post_params

        if files:
            for k, v in six.iteritems(files):
                if not v:
                    continue
                file_names = v if type(v) is list else [v]
                for n in file_names:
                    with open(n, 'rb') as f:
                        filename = os.path.basename(f.name)
                        filedata = f.read()
                        mimetype = (mimetypes.guess_type(filename)[0] or
                                    'application/octet-stream')
                        params.append(
                            tuple([k, tuple([filename, filedata, mimetype])]))

        return params
1313000
def post_parse(self):
        """"""
        if self.cache and not self.cache_loaded:
            self.cache_writer_cls(self.file_name, self.wavefront).write()
248834
public void postProcess() {
		if (foreignColumnName != null) {
			foreignAutoRefresh = true;
		}
		if (foreignAutoRefresh && maxForeignAutoRefreshLevel == NO_MAX_FOREIGN_AUTO_REFRESH_LEVEL_SPECIFIED) {
			maxForeignAutoRefreshLevel = DatabaseField.DEFAULT_MAX_FOREIGN_AUTO_REFRESH_LEVEL;
		}
	}
737495
def post_run(self, outline=False, dump=False, *args, **kwargs):
        """"""
        hooks = self.context.config.post_build
        handle_hooks(
            "post_build",
            hooks,
            self.provider,
            self.context,
            dump,
            outline
        )
702492
protected function doPostGetData()
    {
        foreach ($this->dataTransformers as $dataTransformer) {
            if ($dataTransformer instanceof PostGetDataTransformerInterface) {
                $dataTransformer->postGetData($this->config);
            }
        }
    }
462738
def _postprocess(self, filehandle, metadata):
        ""
        for process in self._postprocessors:
            filehandle = process(filehandle, metadata)
        return filehandle
573421
def process_data(self):

        
        self.trigger("process-data", self.received_data)
        self.received_data = ""
        if self.dispatcher:
            self.time = self.dispatcher.time
256625
def postprocess(self, json_string):
        """"""
        is_compressing, is_hash, compressed, spaces = False, False, [], 0
        for row in json_string.split('\n'):
            if is_compressing:
                if (row[:spaces + 5] == ' ' * (spaces + 4) +
                        ('"' if is_hash else '{')):
                    compressed.append(row.rstrip())
                elif (len(row) > spaces and row[:spaces] == ' ' * spaces and
                        re.match('[\]\}],?', row[spaces:].rstrip())):
                    compressed.append(row.rstrip())
                    is_compressing = False
                else:
                    compressed[-1] += ' ' + row.strip()
            else:
                compressed.append(row.rstrip())
                if any(a in row for a in ['edges', 'nodes']):
                    # Fix to handle issues that arise with empty lists
                    if '[]' in row:
                        continue
                    spaces = sum(1 for _ in takewhile(str.isspace, row))
                    is_compressing, is_hash = True, '{' in row
        return '\n'.join(compressed)
134270
protected void processData(Collection<RI> data) {
        // Check data against all rules
        for (Rule<Collection<RI>, RO> rule : rules) {
            processResult(rule.validate(data));
        }
    }
958642
def post(self, uri, body=None, **kwargs):
        """"""
        return self.fetch('post', uri, kwargs.pop("query", {}), body, **kwargs)
791343
def process(parsed_files, opts)
      r = aggregate(parsed_files)
      r = pre_process(r, opts)
      r = to_class_objects(r, opts)
      return post_process(r, opts)
    end
240585
def prepare_post_parameters(self, post_params=None, files=None):
        
        params = post_params or []
        for key, values in (files or {}).items():
            for maybe_file_or_path in values if isinstance(values, list) else [values]:
                try:
                    # use the parameter as if it was an open file object
                    data = maybe_file_or_path.read()
                    maybe_file_or_path = maybe_file_or_path.name
                except AttributeError:
                    # then it is presumably a file path
                    with open(maybe_file_or_path, 'rb') as fh:
                        data = fh.read()
                basepath = os.path.basename(maybe_file_or_path)
                mimetype = mimetypes.guess_type(basepath)[0] or 'application/octet-stream'
                params.append((key, (basepath, data, mimetype)))
        return params
287711
def _aftermathmp(self):
        """"""
        if not self._flag_e and self._flag_m:
            # join processes
            [proc.join() for proc in self._mpprc]
            if self._exeng == 'server':
                self._mpsvc.join()

            # restore attributes
            if self._exeng == 'server':
                self._frame = list(self._mpfrm)
                self._reasm = list(self._mprsm)
                self._trace = copy.deepcopy(self._mpkit.trace)
            if self._exeng == 'pipeline':
                self._frame = [self._mpkit.frames[x] for x in sorted(self._mpkit.frames)]
                self._reasm = copy.deepcopy(self._mpkit.reassembly)
                self._trace = copy.deepcopy(self._mpkit.trace)

            # shutdown & cleanup
            self._mpmng.shutdown()
            [delattr(self, attr) for attr in filter(lambda s: s.startswith('_mp'), dir(self))]
            self._frnum -= 2
332182
public function process()
    {
        $msgs = $this->getMessages();
        foreach ($msgs as $aMsg) {
            $this->logger->debug(
                '------ Received: ------ ' . "\n" . $aMsg . "\n\n"
            );
            $resPos = strpos($aMsg, 'Response:');
            $evePos = strpos($aMsg, 'Event:');
            if (($resPos !== false) &&
              (($resPos < $evePos) || $evePos === false)
            ) {
                $response = $this->messageToResponse($aMsg);
                $this->incomingQueue[$response->getActionId()] = $response;
            } elseif ($evePos !== false) {
                $event = $this->messageToEvent($aMsg);
                $response = $this->findResponse($event);
                if ($response === false || $response->isComplete()) {
                    $this->dispatch($event);
                } else {
                    $response->addEvent($event);
                }
            } else {
                // broken ami.. sending a response with events without
                // Event and ActionId
                $bMsg = 'Event: ResponseEvent' . "\r\n";
                $bMsg .= 'ActionId: ' . $this->lastActionId . "\r\n" . $aMsg;
                $event = $this->messageToEvent($bMsg);
                $response = $this->findResponse($event);
                $response->addEvent($event);
            }
            $this->logger->debug('----------------');
        }
    }
862176
def valuefrompostdata(self, postdata):
        """"""
        if self.id in postdata and postdata[self.id] != '':
            return float(postdata[self.id])
        else:
            return None
1235923
private function processRequest()
        {
            $this->request['resource'] = (isset($_GET['RESTurl']) && !empty($_GET['RESTurl'])) ? $_GET['RESTurl'] : 'index';
            unset($_GET['RESTurl']);
            $this->request['method'] = Inflector::lower($_SERVER['REQUEST_METHOD']);
            $this->request['headers'] = $this->getHeaders();
            $this->request['format'] = isset($_GET['format']) ? trim($_GET['format']) : null;
            switch($this->request['method']) {
                case 'get':
                    $this->request['params'] = $_GET;
                    break;
                case 'post':
                    $this->request['params'] = array_merge($_POST, $_GET);
                    break;
                case 'put':
                    parse_str(fgc('php://input'), $this->request['params']);
                    break;
                case 'delete':
                    $this->request['params'] = $_GET;
                    break;
                default:
                    break;
            }
            $this->request['content-type'] = $this->getResponseFormat($this->request['format']);
            if(!function_exists('trim_value')) {
                function trim_value(&$value)
                {
                    $value = trim($value);
                }
            }
            array_walk_recursive($this->request, 'trim_value');
        }