Processes this URI entry

Ensures this URI is formatted correctly. If the URI is not formatted
correctly, adds an error message to this widget.
435107
public function process()
    {
        parent::process();

        if ($this->value === null) {
            return;
        }

        $this->value = trim($this->value);

        if ($this->value == '') {
            $this->value = null;
            return;
        }

        if (!$this->validateUri($this->value)) {
            if (
                $this->validateUri($this->default_scheme . '://' . $this->value)
            ) {
                if ($this->scheme_required) {
                    $this->addMessage(
                        $this->getValidationMessage('scheme-required')
                    );
                } else {
                    $this->value = $this->default_scheme . '://' . $this->value;
                }
            } else {
                $this->addMessage($this->getValidationMessage('invalid-uri'));
            }
        }
    }
1234482
public function process()
    {
        switch ($this->inputs['action']) {
            case 'login':
                $this->webLogin();
                break;
            case 'logout':
                $this->webLogout();
                exit($this->showWebLoginForm());
                break;
            case 'getContacts':
                $this->getContacts();
                break;
            case 'updateStatus':
                $this->updateStatus();
                break;
            case 'sendMessage':
                $this->sendMessage();
                break;
            case 'sendBroadcast':
                $this->sendBroadcast();
                break;
            default:
                if (isset($_SESSION['logged_in']) && $_SESSION['logged_in'] == true) {
                    exit($this->showWebForm());
                }
                exit($this->showWebLoginForm());
                break;
        }
    }
586315
protected function process()
    {
        $this->result = $this[self::RESPONSE_PROCESSING] != self::TYPE_RAW
            ? DefaultResponseParser::getInstance()->parse($this)
            : $this->request->getResponse();
    }
935034
private void processOnce() throws CompilationFailedException, IOException, URISyntaxException {
        GroovyShell groovy = new GroovyShell(conf);
        setupContextClassLoader(groovy);
        groovy.run(getScriptSource(isScriptFile, script), args);
    }
1241163
protected function process()
    {

        // initialize the URL key and array for the categories
        $urlKey = null;
        $categories = array();

        // query whether or not the URL key column has a value
        if ($this->hasValue(ColumnKeys::URL_KEY)) {
            $urlKey = $this->getValue(ColumnKeys::URL_KEY);
        } else {
            $this->setValue(
                ColumnKeys::URL_KEY,
                $urlKey = $this->convertNameToUrlKey($this->getValue(ColumnKeys::NAME))
            );
        }

        // explode the path into the category names
        if ($categories = $this->explode($this->getValue(ColumnKeys::PATH), '/')) {
            // initialize the category with the actual category's URL key
            $categoryPaths = array($urlKey);
            // prepare the store view code
            $this->prepareStoreViewCode();
            // load ID of the actual store view
            $storeId = $this->getRowStoreId(StoreViewCodes::ADMIN);

            // iterate over the category names and try to load the category therefore
            for ($i = sizeof($categories) - 1; $i > 1; $i--) {
                try {
                    // prepare the expected category name
                    $categoryPath = implode('/', array_slice($categories, 0, $i));
                    // load the existing category and prepend the URL key the array with the category URL keys
                    $existingCategory = $this->getCategoryByPkAndStoreId($this->mapPath($categoryPath), $storeId);
                    // query whether or not an URL key is available or not
                    if (isset($existingCategory[MemberNames::URL_KEY])) {
                        array_unshift($categoryPaths, $existingCategory[MemberNames::URL_KEY]);
                    } else {
                        $this->getSystemLogger()->debug(sprintf('Can\'t find URL key for category %s', $categoryPath));
                    }
                } catch (\Exception $e) {
                    $this->getSystemLogger()->debug(sprintf('Can\'t load parent category %s', $categoryPath));
                }
            }

            // create the header for the URL path
            if (!$this->hasHeader(ColumnKeys::URL_PATH)) {
                $this->addHeader(ColumnKeys::URL_PATH);
            }

            // set the URL path
            $this->setValue(ColumnKeys::URL_PATH, implode('/', $categoryPaths));
        }
    }
935544
public function process()
    {
        // {{{ defines the xhtml template

        static $xhtml_template = '';

        if ($xhtml_template == '') {
            $doctype =
                '<!DOCTYPE html PUBLIC ' .
                '"-//W3C//DTD XHTML 1.0 Strict//EN" ' .
                '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' .
                "\n";

            $xhtml_template =
                $doctype .
                <<<XHTML
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<title>SwatXHTMLTextarea Content</title>
	</head>
	<body>
		<div>
		%s
		</div>
	</body>
</html>

XHTML;
        }

        // }}}

        parent::process();

        $ignore_validation_errors =
            $this->allow_ignore_validation_errors &&
            $this->ignore_errors_checkbox->value;

        $xhtml_content = sprintf($xhtml_template, $this->getXHTMLContent());

        $errors = libxml_use_internal_errors(true);

        $document = new DOMDocument();
        $document->loadXML(
            $xhtml_content,
            LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID
        );

        $xml_errors = libxml_get_errors();
        libxml_clear_errors();
        libxml_use_internal_errors($errors);

        if (count($xml_errors) > 0 && !$ignore_validation_errors) {
            $this->addMessage($this->getValidationErrorMessage($xml_errors));
            $this->has_validation_errors = true;
        }
    }
852192
public void process() {
    // are we ready to process yet, or have we had an error, and are
    // waiting a bit longer in the hope that it will resolve itself?
    if (error_skips > 0) {
      error_skips--;
      return;
    }
    
    try {
      if (logger != null)
        logger.debug("Starting processing");
      status = "Processing";
      lastCheck = System.currentTimeMillis();

      // FIXME: how to break off processing if we don't want to keep going?
      processor.deduplicate(batch_size);

      status = "Sleeping";
      if (logger != null)
        logger.debug("Finished processing");
    } catch (Throwable e) {
      status = "Thread blocked on error: " + e;
      if (logger != null)
        logger.error("Error in processing; waiting", e);
      error_skips = error_factor;
    }
  }
1025905
public function process()
    {
        if (
            $this->getForm()->getHiddenField($this->id . '_submitted') === null
        ) {
            return;
        }

        parent::process();

        foreach ($this->values as $option_value) {
            $this->getEntryWidget($option_value)->process();
        }
    }
832370
private function prepare()
    {
        $this->uri = $this->getURI();
        $this->discoverRoute();
        $this->isURIClean();
        $this->currentURL = $this->baseURL($this->uri);
        $this->baseURL = $this->baseURL();
    }
359953
protected function process()
    {

        // query whether or not, the image changed
        if ($this->isParentImage($imagePath = $this->getValue(ColumnKeys::IMAGE_PATH))) {
            return;
        }

        // initialize and persist the product media gallery value
        $productMediaGalleryValue = $this->initializeProductMediaGalleryValue($this->prepareAttributes());
        $this->persistProductMediaGalleryValue($productMediaGalleryValue);

        // temporarily persist the image name
        $this->setParentImage($imagePath);
    }
1015609
private function process()
    {
        if (empty($this->params)) {
            throw new ResolutionException('Parameters were not given');
        }
        $mode = $this->getMode();

        switch ($mode) {
            case 'list':
                $this->listAction();
                break;
            case 'compile':
                $this->compileAction();
                break;
        }
    }
80883
public function process()
    {
        $saIni = $this->getSiteAccessIni();
        $this->destinationLocale = $saIni->variable( 'RegionalSettings', 'ContentObjectLocale' );

        // Detect the type of siteaccess we are dealing with. Initially URI and Host are supported.
        // We don't want the siteaccess part here, since we are inserting our siteaccess name.
        $indexFile = trim( eZSys::indexFile( false ), '/' );
        switch ( $GLOBALS['eZCurrentAccess']['type'] )
        {
            case eZSiteAccess::TYPE_URI:
                eZURI::transformURI( $host, true, 'full' );
                break;

            default:
                $host = $saIni->variable( 'SiteSettings', 'SiteURL' );
                $host = eZSys::serverProtocol()."://".$host;
                break;
        }
        $this->baseDestinationUrl = "{$host}{$indexFile}";
    }
39372
public function process()
    {
        parent::process();

        if ($this->show_check_all) {
            $this->check_all->process();
        }

        // this is part of the old selection API
        $item_name = $this->getCheckboxRendererId();
        if (isset($_POST[$item_name]) && is_array($_POST[$item_name])) {
            $this->items = $_POST[$item_name];
        }
    }
187110
public function process ()
		{
			if (!empty( $this->_params ))
			{
				if ($this->getIsUploading())
					$this->uploadChunk();
				else
					$this->testChunk();
			}
		}
368539
public function process()
    {
        parent::process();

        if ($this->value === null) {
            return;
        }

        $locale = SwatI18NLocale::get($this->locale);
        $format = $locale->getNationalCurrencyFormat();
        $max_decimal_places =
            $this->decimal_places === null
                ? $format->fractional_digits
                : $this->decimal_places;

        $value = $this->getRawValue();

        // Get the number of entered fractional digits places from the raw
        // value. This checks the raw value instead of the processed value
        // because the processed value could have been parsed into a float by
        // this point.
        $decimal_position = mb_strpos(
            (string) $value,
            $format->decimal_separator
        );
        if ($decimal_position === false) {
            $decimal_places = 0;
        } else {
            $fractional_digits = mb_substr(
                rtrim((string) $value, '0'),
                $decimal_position + mb_strlen($format->decimal_separator)
            );

            $decimal_places = preg_match_all('/[0-9]/', $fractional_digits);
        }

        // check if length of the given fractional part is more than the
        // allowed length
        if ($decimal_places > $max_decimal_places) {
            // validation failed so reset value to the raw value
            $this->value = $value;

            if ($this->decimal_places === null) {
                $message = $this->getValidationMessage(
                    'currency-decimal-places'
                );

                $max_decimal_places_formatted = str_replace(
                    '%',
                    '%%',
                    $locale->formatNumber($max_decimal_places)
                );

                // C99 specification includes spacing character, remove it
                $currency_formatted = str_replace(
                    '%',
                    '%%',
                    $locale->getInternationalCurrencySymbol()
                );

                $message->primary_content = sprintf(
                    $message->primary_content,
                    $currency_formatted,
                    $max_decimal_places_formatted
                );
            } else {
                if ($max_decimal_places === 0) {
                    $message = $this->getValidationMessage('no-decimal-places');
                } else {
                    $max_decimal_places_formatted = str_replace(
                        '%',
                        '%%',
                        $locale->formatNumber($max_decimal_places)
                    );

                    // note: not using getValidationMessage() because of
                    // ngettext. We may want to add this ability to that method
                    $message = new SwatMessage(
                        sprintf(
                            Swat::ngettext(
                                'The %%s field has too many decimal places. There ' .
                                    'can be at most one decimal place.',
                                'The %%s field has too many decimal places. There ' .
                                    'can be at most %s decimal places.',
                                $max_decimal_places
                            ),
                            $max_decimal_places_formatted
                        ),
                        'error'
                    );
                }
            }

            $this->addMessage($message);
        }
    }
693295
private function parseUriReference()
    {
        $this->parseScheme();
        $this->parseAuthority();
        $this->parsePath();
        $this->parseQuery();
        $this->parseFragment();

        $this->doSchemeSpecificPostProcessing();

        if (strlen($this->remaining)) {
            throw new ErrorException("Still something left after parsing, shouldn't happen: '$this->remaining'");
        }
    }
150489
public function process()
    {

        if ($this->plugin->request()->has('_flush')) {

            if ($this->flushCache($this->plugin->request()->get('_flush'))) {

                $this->attributes['alertClass'] = 'success';
                $this->attributes['messages'] = array(
                    '&#10004; ' . $this->plugin->config()->get('plugin.namespace') . ' ' . ucwords($this->plugin->request()->get('_flush')) . ' flushed successfully.'
                );
                //Refresh Data
            } else {

                $this->attributes['alertClass'] = 'error';
                $this->attributes['messages'] = array(
                    '&#9888; ' . $this->plugin->config()->get('plugin.namespace') . ' ' . ucwords($this->plugin->request()->get('_flush'))
                    .' could not be flushed.  The file(s) may not exist; If they exist, check directory structure, permissions and config paths.'
                );
            }

            $this->data();
        }

    }