Swat/SwatUriEntry.php
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'));
            }
        }
    }
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'));
            }
        }
    }
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' ) ) ; } } }
Processes this URI entry

Ensures this URI is formatted correctly. If the URI is not formatted
correctly, adds an error message to this widget.
Processes this URI entry