Post process value, e.g. change its type

@return void
506201
protected function postProcessing(): void
    {
        if (isset($this->value)) {
            $this->value = array_map(function ($item) {
                if (ctype_digit($item)) {
                    return intval($item);
                } else {
                    return $item;
                }
            }, $this->value);
        }
    }
214308
public function process()
    {
        if (!$this->getForm()->isSubmitted()) {
            return;
        }

        parent::process();

        $this->processValues();

        if (
            $this->required &&
            count($this->values) == 0 &&
            $this->isSensitive()
        ) {
            $this->addMessage($this->getValidationMessage('required'));
        }
    }
586829
protected function postProcessData()
    {
        $comment = "\n/* " . (!empty($this->filters) ? implode('|', $this->filters) . '::' : '') . $this->value . " */\n";

        $this->output = $comment . $this->output;
    }
179472
public function postProcess(ProcessEvent $e)
    {
        $appEvent       = clone $e->getWorker()->getEvent();
        $appEvent->setTarget($appEvent->getApplication());

        $appEvents      = $appEvent->getApplication()->getEventManager();

        $appResponse    = clone $appEvent->getResponse();
        $appEvent->setResponse($appResponse);
        $appEvent->setResult($e->getResult());

        $appEvents->trigger(MvcEvent::EVENT_RENDER, $appEvent);

        $e->setResult($appEvent->getResponse()->getContent());

        if (Console::isConsole() && is_string($e->getResult())) {
            echo $e->getResult();
        }
    }
558577
public function process()
    {
        parent::process();

        // if nothing was submitted by the user, shortcut return
        if (!$this->hasRawValue()) {
            $this->value = null;
            return;
        }

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

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

        $len = $this->value === null ? 0 : mb_strlen($this->value);

        if (!$this->required && $this->value === null) {
            return;
        } elseif ($this->value === null) {
            $this->addMessage($this->getValidationMessage('required'));
        } elseif ($this->maxlength !== null && $len > $this->maxlength) {
            $message = $this->getValidationMessage('too-long');
            $message->primary_content = sprintf(
                $message->primary_content,
                $this->maxlength
            );

            $this->addMessage($message);
        } elseif ($this->minlength !== null && $len < $this->minlength) {
            $message = $this->getValidationMessage('too-short');
            $message->primary_content = sprintf(
                $message->primary_content,
                $this->minlength
            );

            $this->addMessage($message);
        }
    }
42963
protected function processValues()
    {
        $form = $this->getForm();
        $data = &$form->getFormData();

        if (isset($data[$this->id])) {
            if (is_array($data[$this->id])) {
                $this->values = $data[$this->id];
            } elseif ($data[$this->id] != '') {
                $this->values = array($data[$this->id]);
            } else {
                $this->values = array();
            }
        } else {
            $this->values = array();
        }
    }
1137629
public function save()
    {
        if( is_admin() && !empty( $_POST ) ) {
            do_action('wpExpressSettingsPageBeforeSave', $this, $_POST);

            foreach( $this->fields->toArray() as $fieldName => $field ) {

                $optionName = "{$this->fieldPrefix}{$fieldName}";

                if( isset( $_POST[$fieldName] ) ) {

                    update_option($optionName, $_POST[$fieldName]);
                    // Update the field value :D
                    $this->fields($fieldName)->setValue($_POST[$fieldName]);
                }

            }

            do_action('wpExpressSettingsPageAfterSave', $this, $_POST);
        }
    }
778085
protected function _process()
    {
        $name = $this->config('field');
        $this->value = $this->_registry->data($name);
        $this->_processed = true;
    }
345274
protected function process($value, string $type)
    {
        if ($type === 'integer') {
            return (int) $value;
        }

        if ($type === 'float') {
            return (float) $value;
        }

        if ($type === 'boolean') {
            return (bool) $value;
        }

        return (string) $value;
    }
676607
public function write( $value ): void {
		if ( $value !== $this->value ) {
			$this->emit( GPIO::BEFORE_VALUE_CHANGE_EVENT, [ $this ] );
			$value = boolval( $value ) ? 1 : 0;
			fwrite( $this->fileHandler, "$value", 1 );
			$this->value = $value;
			$this->emit( GPIO::AFTER_VALUE_CHANGE_EVENT, [ $this ] );
		}
	}
80890
final public function process_change($changetype, $oldvalue) {
        // Check the type of change requested.
        switch ($changetype) {
            // Process a status change.
            case base_setting::CHANGED_STATUS:
                return $this->process_status_change($oldvalue);
            // Process a visibility change.
            case base_setting::CHANGED_VISIBILITY:
                return $this->process_visibility_change($oldvalue);
            // Process a value change.
            case base_setting::CHANGED_VALUE:
                return $this->process_value_change($oldvalue);
        }
        // Throw an exception if we get this far.
        throw new backup_ui_exception('unknownchangetype');
    }
578025
public function process()
        {
            if ($this->_isXhtml === null) {
                $this->_isXhtml = (false !== strpos($this->_html, '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML'));
            }

            $this->_replacementHash = 'MINIFYHTML' . md5($_SERVER['REQUEST_TIME']);
            $this->_placeholders = array();

            // replace SCRIPTs (and minify) with placeholders
            $this->_html = preg_replace_callback(
                    '/(\\s*)(<script\\b[^>]*?>)([\\s\\S]*?)<\\/script>(\\s*)/i'
                    , array($this, '_removeScriptCB')
                    , $this->_html);

            // replace STYLEs (and minify) with placeholders
            $this->_html = preg_replace_callback(
                    '/\\s*(<style\\b[^>]*?>)([\\s\\S]*?)<\\/style>\\s*/i'
                    , array($this, '_removeStyleCB')
                    , $this->_html);

            // remove HTML comments (not containing IE conditional comments).
            $this->_html = preg_replace_callback(
                    '/<!--([\\s\\S]*?)-->/'
                    , array($this, '_commentCB')
                    , $this->_html);

            // replace PREs with placeholders
            $this->_html = preg_replace_callback('/\\s*(<pre\\b[^>]*?>[\\s\\S]*?<\\/pre>)\\s*/i'
                    , array($this, '_removePreCB')
                    , $this->_html);

            // replace TEXTAREAs with placeholders
            $this->_html = preg_replace_callback(
                    '/\\s*(<textarea\\b[^>]*?>[\\s\\S]*?<\\/textarea>)\\s*/i'
                    , array($this, '_removeTextareaCB')
                    , $this->_html);

            // trim each line.
            // @todo take into account attribute values that span multiple lines.
            $this->_html = preg_replace('/^\\s+|\\s+$/m', '', $this->_html);

            // remove ws around block/undisplayed elements
            $this->_html = preg_replace('/\\s+(<\\/?(?:area|base(?:font)?|blockquote|body'
                    . '|caption|center|cite|col(?:group)?|dd|dir|div|dl|dt|fieldset|form'
                    . '|frame(?:set)?|h[1-6]|head|hr|html|legend|li|link|map|menu|meta'
                    . '|ol|opt(?:group|ion)|p|param|t(?:able|body|head|d|h||r|foot|itle)'
                    . '|ul)\\b[^>]*>)/i', '$1', $this->_html);

            // remove ws outside of all elements
            $this->_html = preg_replace_callback(
                    '/>([^<]+)</'
                    , array($this, '_outsideTagCB')
                    , $this->_html);

            // use newlines before 1st attribute in open tags (to limit line lengths)
            $this->_html = preg_replace('/(<[a-z\\-]+)\\s+([^>]+>)/i', "$1\n$2", $this->_html);

            // fill placeholders
            $this->_html = str_replace(
                    array_keys($this->_placeholders)
                    , array_values($this->_placeholders)
                    , $this->_html
            );

            return $this->_html;
        }
1261106
public function change() {
		$table = $this->table('queue_processes');

		$table->changeColumn('pid', 'string', [
			'length' => 40,
			'null' => false,
			'default' => null,
			'encoding' => 'utf8mb4',
			'collation' => 'utf8mb4_unicode_ci',
		]);

		$table->save();
	}
1374179
public function process()
    {
        parent::process();

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

        $float_value = $this->getNumericValue($this->value);

        if ($float_value === null) {
            $this->addMessage($this->getValidationMessage('float'));
        } else {
            $this->value = $float_value;
        }
    }
1078445
public function process($value, $type = CorePDO::PARAM_STR)
    {
        if ($value === null) {
            return null;
        }

        $handler = $this->getHandler($type);

        return $this->{$handler}($value);
    }
203245
private function post_type_options()
    {
        $args = array( 'public' => true );
        $post_types = get_post_types($args, 'objects');
        $output = array();
        foreach ($post_types as $post_type) {
            $output[] = array(
                'value' => $post_type->name,
                'label' => $post_type->label
            );
        }
        return $output;
    }
260669
public function registerPostType()
    {
        $config = $this->getPostTypeConfig();
        if (empty($config)) {
            return;
        }

        register_post_type($this->getPostType(), $config);
    }