lithium\data\Entity::decrement()

public method

Decrements a field by the specified value. Works identically to increment(), but in reverse.

Parameters

  • string $field

    The name of the field to decrement.

  • string $value

    The value by which to decrement the field. Defaults to 1.

Returns

integer

Returns the new value of $field, after modification.

Source

	public function decrement($field, $value = 1) {
		return $this->increment($field, $value * -1);
	}