Automattic\WooCommerce\Utilities

LoggingUtil::generate_log_file_id()public staticWC 1.0

Generate a public ID for a log file based on its properties.

The file ID is the basename of the file without the hash part. It allows us to identify a file without revealing its full name in the filesystem, so that it's difficult to access the file directly with an HTTP request.

Метод класса: LoggingUtil{}

Хуков нет.

Возвращает

Строку.

Использование

$result = LoggingUtil::generate_log_file_id( $source, ?int $rotation, $created ): string;
$source(строка) (обязательный)
The source of the log entries contained in the file.
?int $rotation **
-
По умолчанию: null
$created(int)
The date the file was created, as a Unix timestamp.

Код LoggingUtil::generate_log_file_id() WC 9.8.4

public static function generate_log_file_id( string $source, ?int $rotation = null, int $created = 0 ): string {
	return File::generate_file_id( $source, $rotation, $created );
}