<?php
/*
 * Software Name: Eorisis Pixels
 * Software URI: https://eorisis.com/shop/software/joomla/pixels
 * Author: Eorisis
 * Author URI: https://eorisis.com
 * Copyright: Copyright (C) 2011-2025 EORISIS. All Rights Reserved.
 * License: GNU General Public License version 2; See https://eorisis.com/gpl
 * Terms of Service: https://eorisis.com/tos
 */
namespace com_eorisis_pixels\framework\install_package\lib;
\defined('_JEXEC') or die;

class eorisis
{
	private static $namespace_path = '';

	// --------------------------------------------------

	public function __construct(string $namespace_path)
	{
		self::$namespace_path = $namespace_path;
	}

	// --------------------------------------------------

	public function register() // void
    {
		\spl_autoload_register(function(string $class)
		{
			if (\strpos($class, __NAMESPACE__) === 0)
			{
				$suffix = \substr($class, \strlen(__NAMESPACE__));
				include_once self::$namespace_path.\str_replace('\\', '/', $suffix).'.php';
			}
		});
    }
}
