lithium\console\Request::shift()

public method

Moves params up a level. Sets command to action, action to passed[0], and so on.

Parameters

  • integer $num

    how many times to shift

Returns

self

Source

	public function shift($num = 1) {
		for ($i = $num; $i > 1; $i--) {
			$this->shift(--$i);
		}
		$this->params['command'] = $this->params['action'];
		if (isset($this->params['args'][0])) {
			$this->params['action'] = array_shift($this->params['args']);
		}
		return $this;
	}