PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Notice: ob_end_clean(): Failed to delete buffer. No buffer to delete in /home/qpfajntr/ekhaya.265thami.com/qxtr.php on line 8
$#$#$#

Dir : /home/qpfajntr/NBM Site Backup/wp-content/plugins/wp-job-manager/
Server: Linux premium288.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
IP: 162.254.39.137
Choose File :

Url:
Dir : /home/qpfajntr/NBM Site Backup/wp-content/plugins/wp-job-manager/wp-job-manager-autoload.php

<?php
/**
 * Autoload plugin classes.
 *
 * @package wp-job-manager
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Autoload plugin classes.
 *
 * @since 2.3.0
 */
class WP_Job_Manager_Autoload {

	/**
	 * Namespace -> directory mappings.
	 *
	 * @var array
	 */
	private static $autoload_map = [];

	/**
	 * Add the autoloader.
	 */
	public static function init() {
		spl_autoload_register( [ self::class, 'autoload' ] );
	}

	/**
	 * Register a new plugin with a class prefix and directory to autoload.
	 *
	 * @param string $namespace Root namespace. Should start with WP_Job_Manager_.
	 * @param string $dir Directory to autoload.
	 */
	public static function register( $namespace, $dir ) {
		self::$autoload_map[ $namespace ] = $dir;
	}

	/**
	 * Autoload plugin classes.
	 *
	 * @access private
	 *
	 * @param string $class_name Class name.
	 */
	public static function autoload( $class_name ) {

		if ( ! str_starts_with( $class_name, 'WP_Job_Manager' ) || ! str_contains( $class_name, '\\' ) ) {
			return;
		}

		[ $namespace, $file_name ] = explode( '\\', $class_name, 2 );

		if ( empty( $namespace ) || empty( $file_name ) || empty( self::$autoload_map[ $namespace ] ) ) {
			return;
		}

		$root_dir = self::$autoload_map[ $namespace ];

		$file_name = strtolower( $file_name );
		$dirs      = explode( '\\', $file_name );
		$file_name = array_pop( $dirs );
		$file_name = str_replace( '_', '-', $file_name );

		$file_dir = implode( '/', [ $root_dir, ...$dirs ] );

		$file_paths = [
			'class-' . $file_name . '.php',
			'trait-' . $file_name . '.php',
		];

		foreach ( $file_paths as $file_path ) {
			$file_path = $file_dir . '/' . $file_path;
			if ( file_exists( $file_path ) ) {
				require $file_path;
				return;
			}
		}

	}

}