private function SocketHandler::validateTimeout in Lagoon Logs 8
3 calls to SocketHandler::validateTimeout()
- SocketHandler::setConnectionTimeout in src/
Logger/ SocketHandler.php - Set connection timeout. Only has effect before we connect.
- SocketHandler::setTimeout in src/
Logger/ SocketHandler.php - Set write timeout. Only has effect before we connect.
- SocketHandler::setWritingTimeout in src/
Logger/ SocketHandler.php - Set writing timeout. Only has effect during connection in the writing cycle.
File
- src/
Logger/ SocketHandler.php, line 275
Class
- SocketHandler
- Stores to any socket - uses fsockopen() or pfsockopen().
Namespace
Drupal\lagoon_logs\LoggerCode
private function validateTimeout($value) {
$ok = filter_var($value, FILTER_VALIDATE_FLOAT);
if ($ok === FALSE || $value < 0) {
throw new \InvalidArgumentException("Timeout must be 0 or a positive float (got {$value})");
}
}