condition = $condition; $this->prevTotal = $prevTotal; $this->newTotal = $newTotal; } /** * Whether the operation was/is allowed. * * @return bool */ public function isAllowed() { return $this->newTotal <= $this->condition->limit; } /** * Get a string representing the object, for testing or debugging * * @return string */ public function dump() { return "LimitActionResult{{$this->newTotal}/{$this->condition->limit}}"; } }