REDROOM
PHP 8.0.30
Path:
Logout
Edit File
Size: 2.41 KB
Close
/home/certprox/template.certproxywizard.com/wp-content/plugins/hostinger/includes/Admin/Jobs/AbstractBatchedJob.php
Text
Base64
<?php namespace Hostinger\Admin\Jobs; use Hostinger\LlmsTxtGenerator\LlmsTxtParser; defined( 'ABSPATH' ) || exit; abstract class AbstractBatchedJob extends AbstractJob { public function init(): void { add_action( $this->get_create_batch_hook(), array( $this, 'handle_create_batch_action' ), 10, 2 ); parent::init(); } protected function get_create_batch_hook(): string { return "{$this->get_hook_base_name()}create_batch"; } public function schedule( array $args = array() ): void { $this->schedule_create_batch_action( 1, $args ); } public function handle_create_batch_action( int $batch_number, array $args ): void { $items = $this->get_batch( $batch_number, $args ); if ( empty( $items ) ) { $this->handle_complete( $batch_number, $args ); } else { $this->schedule_process_action( $items, $args ); $this->schedule_create_batch_action( $batch_number + 1, $args ); } } protected function get_batch_size(): int { return apply_filters( 'hostinger_batch_item_limit', LlmsTxtParser::DEFAULT_LIMIT ); } protected function get_query_offset( int $batch_number ): int { return $this->get_batch_size() * ( $batch_number - 1 ); } protected function schedule_create_batch_action( int $batch_number, array $args ): void { if ( $this->can_schedule( array( $batch_number ) ) ) { $this->action_scheduler->schedule_immediate( $this->get_create_batch_hook(), array( $batch_number, $args, ) ); } } protected function schedule_process_action( array $items = array(), array $args = array() ): void { $job_data = array( 'items' => $items, 'args' => $args, ); if ( ! $this->is_processing( $job_data ) ) { $this->action_scheduler->schedule_immediate( $this->get_process_item_hook(), array( $job_data ) ); } } protected function is_processing( array $args = array() ): bool { return $this->action_scheduler->has_scheduled_action( $this->get_process_item_hook(), array( $args ) ); } protected function handle_complete( int $final_batch_number, array $args ): void { return; } abstract protected function get_batch( int $batch_number, array $args ): array; }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
AbstractBatchedJob.php
2.41 KB
lrw-r--r--
2026-06-10 16:30:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AbstractJob.php
1.50 KB
lrw-r--r--
2026-06-10 16:30:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ActionScheduler.php
1.22 KB
lrw-r--r--
2026-06-10 16:30:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
JobInitializer.php
688 B
lrw-r--r--
2026-06-10 16:30:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
JobInterface.php
385 B
lrw-r--r--
2026-06-10 16:30:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LlmsTxtInjectContentJob.php
3.08 KB
lrw-r--r--
2026-06-10 16:30:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
NotifyMcpJob.php
1.48 KB
lrw-r--r--
2026-06-10 16:30:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).