Back to Cli class

Method serialize

public string
serialize
()
Method to serialize the input.
Returns
  • string The serialized input.
Since
  • 3.0.0
Deprecated
  • 5.0
Class: Cli
Project: Joomla

Method serialize - Source code

/**
 * Method to serialize the input.
 *
 * @return  string  The serialized input.
 *
 * @since   3.0.0
 * @deprecated  5.0  Use the `joomla/console` package instead
 */
public function serialize()
{
    // Load all of the inputs.
    $this->loadAllInputs();
    // Remove $_ENV and $_SERVER from the inputs.
    $inputs = $this->inputs;
    unset($inputs['env']);
    unset($inputs['server']);
    // Serialize the executable, args, options, data, and inputs.
    return serialize(array($this->executable, $this->args, $this->options, $this->data, $inputs));
}