Automattic\WooCommerce\Internal\Admin\Logging\FileV2

FileController::generate_filename()privateWC 1.0

Generate the full name of a file based on source and date values.

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

Хуков нет.

Возвращает

Строку.

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

// private - только в коде основоного (родительского) класса
$result = $this->generate_filename( $source, $time ): string;
$source(строка) (обязательный)
The source property of a log entry, which determines the filename.
$time(int) (обязательный)
The time of the log entry as a Unix timestamp.

Код FileController::generate_filename() WC 9.5.1

private function generate_filename( string $source, int $time ): string {
	$file_id = File::generate_file_id( $source, null, $time );
	$hash    = File::generate_hash( $file_id );

	return "$file_id-$hash.log";
}