public function setTimeout($timeout) { if (is_integer($timeout)) { $this->timeout = $timeout; } else { throw new InvalidArgumentException('$timeout precisa ser o tempo em segundos.'); } }