Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- interface IApplicationContextAware {
- public abstract function setAppContext();
- $appContext) {
- }
- interface IServiceProvider {
- public abstract function getServiceInstance();
- }
- class System {
- private $appId;
- private static $instance;
- private $_Settings = array();
- private $_Services = array();
- private $knownServiceClassNames = array();
- private $_functionsToExecuteAfterInit = array();
- private $TemplateProcessorPrototype;
- private $TemplateSupplierPrototype;
- public function __construct($appId) {
- self::$instance = $this;
- $this->appId = $appId;
- }
- public function getAppId() {
- return $this->appId;
- }
- private function displayBlockedIpMessage() {
- $message = $this->getSetting("BLOCKED_IP_MESSAGE");
- $message = str_replace("{site_url}", $this->getSetting("SITE_URL"), $message);
- $message = str_replace("{adminNotificationEmail}", $this->getSettingByName("notification_email"), $message);
- header($_SERVER['SERVER_PROTOCOL'] . " 403 Forbidden");
- echo nl2br($message);
- }
- public function addFunctionToExecuteAfterInit($fn, $params = array()) {
- $this->_functionsToExecuteAfterInit[] = array("function" => $fn, "params" => $params);
- }
- public function run() {
- header("Content-type:text/html;charset=utf-8");
- $this->boot();
- $this->init();
- $this->executeAfterInitFunctions();
- $this->startup();
- $this->respond();
- }
- public function loadSettings($filename) {
- $newSettings = include ($filename);
- $this->_Settings = array_merge($this->_Settings, $newSettings);
- }
- public function getSetting($name) {
- if (empty($name)) {
- return null;
- }
- return null;
- }
- public function registerService($name, $provider) {
- if (strlen($name) < 1) {
- throw new Exception("Illigal name for service name \"{$name}\" is given");
- }
- $this->_Services[$name] = $provider;
- }
- private function init() {
- $this->createSingletonServiceByClassName("DB");
- $this->createSingletonServiceByClassName("Session");
- $this->createSingletonServiceByClassName("Settings");
- $this->createSingletonServiceByClassName("CustomSettings");
- $this->createSingletonServiceByClassName("Navigator");
- $this->createSingletonServiceByClassName("PageManager");
- $this->createSingletonServiceByClassName("UserSettings");
- $this->createSingletonServiceByClassName("ObjectMother");
- $this->createSingletonServiceByClassName("PathManager");
- $this->createSingletonServiceByClassName("Cache");
- $this->createSingletonServiceByClassName("Cookie");
- $this->createSingletonServiceByClassName("PathProvider");
- $this->ServiceManager = $this->createServiceManager();
- $this->_ModuleManager = $this->createModuleManager();
- }
- private function startup() {
- $this->prepareGlobalArrays();
- $this->setGlobalTemplateVariable("site_url", $this->getSystemSettings("SITE_URL"));
- $this->setGlobalTemplateVariable("radius_search_unit", $this->getSettingByName("radius_search_unit"));
- $this->setGlobalTemplateVariable("google_maps_API_key", $this->getSettingByName("google_maps_API_key"));
- $this->setGlobalTemplateVariable("product_version", $this->getSettingByName("product_version"));
- $this->setGlobalTemplateVariable("notification_email", $this->getSettingByName("notification_email"));
- $this->setGlobalTemplateVariable("enable_wysiwyg_editor", $this->getSettingByName("enable_wysiwyg_editor"));
- $this->setGlobalTemplateVariable("custom_settings", $this->CustomSettings->getSettingsToRegister());
- $this->setGlobalTemplateVariable("mobile_front_end_url", $this->doesAppExist("mobileFrontEnd") ? $this->getApp("mobileFrontEnd")->getSystemSettings("SITE_URL") : null);
- $this->setGlobalTemplateVariable("enable_share_block", $this->getSettingByName("enable_share_block"));
- $this->_ModuleManager->executeModulesStartupFunctions();
- }
- private function executeAfterInitFunctions() {
- foreach($this->_functionsToExecuteAfterInit as $fnDefenition) {
- call_user_func_array($fnDefenition['function'], array($this, $fnDefenition['params']));
- }
- }
- public function getI18N() {
- if (!isset($this->_Services['I18N'])) {
- $this->createSingletonServiceByClassName("I18N");
- }
- return $this->I18N;
- }
- public function get($serviceName) {
- if (!isset($this->knownServiceClassNames[$serviceName]) && !isset($this->_Services[$serviceName])) {
- $this->ServiceManager->tryToFindAndCreateService($serviceName);
- }
- if (isset($this->knownServiceClassNames[$serviceName])) {
- $this->lazyCreateSingletonServiceByClassName($serviceName);
- unset($Var_456[$serviceName]);
- }
- if (!isset($this->_Services[$serviceName])) {
- throw new Exception("Unknown service \"{$serviceName}\" requested");
- }
- return $this->_Services[$serviceName]->getServiceInstance();
- }
- public function __get($serviceName) {
- return $this->get($serviceName);
- }
- public function createSingletonServiceByClassName($className) {
- if (!isset($this->_Services[$className])) {
- $this->knownServiceClassNames[$className] = true;
- }
- }
- private function lazyCreateSingletonServiceByClassName($className) {
- $service = $this->createContextAwareObjectOfClass($className);
- if (method_exists($service, "init")) {
- $service->init();
- }
- $this->registerService($className, new SingletonServiceProvider($service));
- }
- public function createContextAwareObjectOfClass($className) {
- $obj = new $className();
- if (!$obj instanceof IApplicationContextAware) {
- throw new Exception("Non-context aware class \"{$className}\" passed to createContextAwareObjectOfClass");
- }
- $obj->setAppContext($this);
- return $obj;
- }
- private function createModuleManager() {
- require_once ("ModuleManager.php");
- $moduleManager = $this->createContextAwareObjectOfClass("ModuleManager");
- $moduleManager->setPathManager($this->PathManager);
- $moduleManager->init();
- return $moduleManager;
- }
- private function createServiceManager() {
- require_once ("ServiceManager.php");
- $instance = $this->createContextAwareObjectOfClass("ServiceManager");
- $instance->setPathManager($this->PathManager);
- $instance->init();
- return $instance;
- }
- public function getSystemSettings($setting_name) {
- return $this->getSetting($setting_name);
- }
- public function loadSystemSettings($file_name) {
- if (is_readable($file_name)) {
- if (!isset($GLOBALS['system_settings'])) {
- $GLOBALS['system_settings'] = array();
- }
- $settings = require_once ($file_name);
- if (gettype($settings) == "array") {
- $GLOBALS['system_settings'] = array_merge($GLOBALS['system_settings'], $settings);
- }
- } else {
- exit("index.php" . " File {$file_name} isn't readable Cannot read config file");
- }
- }
- public function getGlobalTemplateVariables() {
- return $GLOBALS['TEMPLATE_VARIABLES'];
- }
- public function boot() {
- $path_to_system_core = $this->getSetting("CLASSES_DIR");
- set_include_path("." . PATH_SEPARATOR . $this->getSetting("LIBRARY_DIR"));
- set_include_path(get_include_path() . PATH_SEPARATOR . $this->getSetting("EXT_LIBRARY_DIR"));
- }
- public function getGlobalTemplateVariable($variable_name) {
- return isset($GLOBALS['TEMPLATE_VARIABLES'][$variable_name]) ? $GLOBALS['TEMPLATE_VARIABLES'][$variable_name] : null;
- }
- public function setGlobalTemplateVariable($name, $value, $in_global_array = true) {
- if ($in_global_array) {
- $GLOBALS['TEMPLATE_VARIABLES']['GLOBALS'][$name] = $value;
- } else {
- $GLOBALS['TEMPLATE_VARIABLES'][$name] = $value;
- }
- }
- public function getModuleManager() {
- return $this->_ModuleManager;
- }
- public function getTemplateProcessor() {
- $module_manager = $this->getModuleManager();
- $module = $module_manager->getCurrentModuleAndFunction() [0];
- if ($module != null) {
- $template_processor = $this->createTemplateProcessor($module);
- return $template_processor;
- }
- return null;
- }
- public function createTemplateProcessor($module) {
- if (is_null($this->TemplateProcessorPrototype)) {
- $fileSystem = new FileSystem();
- $templateFactory = new TemplateFactory();
- $templateFactory->setFileSystem($fileSystem);
- $templatePathManager = new TemplatePathManager($this->getSystemSettings("TEMPLATES_DIR"));
- $factory = new ThemeFactory();
- $factory->setSiteUrl($this->getSetting("SITE_URL"));
- $factory->setTemplatePathManager($templatePathManager);
- $factory->setFileNotFoundAction($this->getFileNotFoundAction());
- $factory->setTemplateFactory($templateFactory);
- $factory->setFileSystem($fileSystem);
- $themeBuilder = new ThemeBuilder();
- $themeBuilder->setThemeFactory($factory);
- $themeManager = $this->createContextAwareObjectOfClass("ThemeManager");
- $themeManager->setThemeBuilder($themeBuilder);
- $theme = $themeManager->getCurrentTheme();
- require_once ($this->getSystemSettings("SMARTY_PATH"));
- $template_processor = $this->createContextAwareObjectOfClass("TemplateProcessor");
- $template_processor->init();
- $template_processor->setHtmlTagConverter($this->ObjectMother->createHTMLTagConverterInArray());
- $path = new Path();
- $template_processor->compile_dir = $this->PathProvider->getCacheDir($path->combine($this->getSystemSettings("COMPILED_TEMPLATES_DIR"), $this->getSystemSettings("SYSTEM_ACCESS_TYPE"), $theme->getName()));
- $i18n = $this->getI18N();
- $template_processor->registerFilter("pre", array($i18n, "replace_translation_alias"));
- $template_processor->registerPlugin("block", "tr", array($i18n, "translate"));
- $template_processor->registerObject("i18n", $i18n);
- $template_processor->registerPlugin("function", "display_error_messages", array($this->get("Messages"), "fetchErrorMessages"));
- $template_processor->registerPlugin("function", "display_success_messages", array($this->get("Messages"), "fetchSuccessMessages"));
- $template_processor->registerPlugin("function", "get_custom_setting", array($this->get("CustomSettings"), "getSettingValueFromTemplate"));
- $this->getTemplateExternalComponentManager()->register($template_processor);
- $this->setGlobalTemplateVariable("themeInheritanceBranch", $themeManager->getThemeInheritanceBranch());
- $this->setGlobalTemplateVariable("current_theme", $theme->getName());
- $templateSupplier = new TemplateSupplier();
- $templateSupplier->setTheme($theme);
- $this->TemplateProcessorPrototype = $template_processor;
- $this->TemplateSupplierPrototype = $templateSupplier;
- }
- $template_processor = clone $this->TemplateProcessorPrototype;
- $templateSupplier = clone $this->TemplateSupplierPrototype;
- $templateSupplier->setModuleName($module);
- $templateSupplier->registerResources($template_processor);
- $template_processor->assign($this->getGlobalTemplateVariables());
- return $template_processor;
- }
- public function getFileNotFoundAction() {
- switch ($this->getSystemSettings("FILE_NOT_FOUND_ACTION")) {
- case "ReturnNull":
- return new ReturnNullAction();
- case "Return404":
- return new Return404Action($this->getSystemSettings("SITE_URL") . $this->getSystemSettings("PAGE_404_URI"));
- case "ThrowException":
- return new ThrowFileNotFoundExceptionAction();
- }
- }
- private function getTemplateExternalComponentManager() {
- if (!isset($this->_Services['TemplateExternalComponentManager'])) {
- $templateExternalComponentManager = new TemplateExternalComponentManager();
- $templateExternalComponentManager->setSiteUrl($this->getSystemSettings("SITE_URL"));
- $templateExternalComponentManager->setExternalComponentsPath($this->PathManager->getExternalComponentsPath());
- $templateExternalComponentManager->setFileNotFoundAction($this->getFileNotFoundAction());
- $this->registerService("TemplateExternalComponentManager", new SingletonServiceProvider($templateExternalComponentManager));
- }
- return $this->TemplateExternalComponentManager;
- }
- public function setCurrentUserInfo($current_user_info) {
- $this->setGlobalTemplateVariable("current_user", $current_user_info);
- }
- public function setPageTitle($page_title) {
- $this->setGlobalTemplateVariable("TITLE", $page_title, false);
- }
- public function getPageTitle() {
- return $this->getGlobalTemplateVariable("TITLE");
- }
- public function setPageKeywords($page_keywords) {
- $this->setGlobalTemplateVariable("KEYWORDS", $page_keywords, false);
- }
- public function getPageKeywords() {
- return $this->getGlobalTemplateVariable("KEYWORDS");
- }
- public function setPageDescription($page_description) {
- $this->setGlobalTemplateVariable("DESCRIPTION", $page_description, false);
- }
- public function getPageDescription() {
- return $this->getGlobalTemplateVariable("DESCRIPTION");
- }
- public function getUserSettings($module_name, $setting_name) {
- return $this->UserSettings->getSetting($module_name, $setting_name);
- }
- public function setUserSettings($module_name, $setting_name, $value) {
- return $this->UserSettings->setSetting($module_name, $setting_name, $value);
- }
- public function executeFunction($module, $setting, $parameters = array(), $inheritRequest = true) {
- $module_manager = $this->getModuleManager();
- return $module_manager->executeFunction($module, $setting, $parameters, $inheritRequest);
- }
- public function getSystemURLByModuleAndFunction($module, $function, $parameters) {
- $parameters_str = "";
- $params = array();
- foreach($parameters as $parameter_name => $parameter_value) {
- array_push($params, urlencode($parameter_name) . "=" . urlencode($parameter_value));
- }
- $parameters_str = join("&", $params);
- $site_url = $this->getSystemSettings("SITE_URL");
- $system_url_base = $this->getSystemSettings("SYSTEM_URL_BASE");
- $url = $site_url . "/" . $system_url_base . "/" . $module . "/" . $function . "?" . $parameters_str;
- return $url;
- }
- public function getModuleAndFunctionBySystemURL($url) {
- $uri = explode("?", $url) [0];
- $function = explode("/", $uri) [3];
- $module = explode("/", $uri) [2];
- return array("module" => $module, "function" => $function);
- }
- private function testLicense() {
- $licenseFilename = $this->getSystemSettings("LICENSE_FILENAME");
- $license = $this->createContextAwareObjectOfClass("License");
- $license->setFilename($licenseFilename);
- $license->setCode("375963276846296538");
- if (!$license->isValid()) {
- header($_SERVER['SERVER_PROTOCOL'] . " 403 Forbidden");
- switch ($license->getError()) {
- case "FILE_NOT_FOUND":
- echo "Cannot find the license file. Please make sure that the license file is named \"{$licenseFilename}\" and is located in \"" . realpath(".") . "\"";
- break;
- case "INVALID_VERIFICATION_CODE":
- echo "The license code is invalid. Please make sure that license is issued to the correct URL: \"" . $this->getSystemSettings("SITE_URL") . "\"";
- break;
- case "EXPIRED_LICENSE":
- echo "The license has expired. Please refer to the WorksForWeb Sales Department (sales@worksforweb.com) for updating/extending your license.";
- break;
- default:
- echo "There is an error in your license. However, the cause of has not been identified.";
- break;
- }
- exit();
- }
- }
- public function respond() {
- $this->testLicense();
- if ($this->IpRangeManager->isIpInBlockList(())) {
- $this->displayBlockedIpMessage();
- } else if ($this->Navigator->isRequestedUnderLegalURI()) {
- $uri = $this->Navigator->getUri();
- $page_config = $this->PageManager->getPageConfig($uri);
- $this->registerService("PageConfig", new SingletonServiceProvider($page_config));
- if ($page_config->pageExists()) {
- echo $this->getResponse($page_config);
- } else {
- header($_SERVER['SERVER_PROTOCOL'] . " 301 Moved Permanently");
- header("Location: {$_SERVER['REQUEST_URI']}/");
- echo "The requested resource is located under a different URL: {$_SERVER['REQUEST_URI']}/";
- return;
- if ($this->doesParentSitePageExist($uri)) {
- $parent_uri = $this->getSitePageParentURI($uri);
- $page_config = $this->PageConfig->getPageConfig($parent_uri);
- $passed_parameters_via_uri = substr($uri, strlen($parent_uri));
- $_REQUEST['passed_parameters_via_uri'] = $passed_parameters_via_uri;
- $page_content = $this->getResponse($page_config);
- echo $page_content;
- } else {
- header($_SERVER['SERVER_PROTOCOL'] . " 404 Not Found");
- echo "404 Not Found";
- }
- }
- } else {
- header($_SERVER['SERVER_PROTOCOL'] . " 403 Forbidden");
- echo "The software is not configured to respond to requests to the following URL: <tt>http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}</tt>.\n<br>";
- }
- }
- public function getCurrentPageConfig() {
- return isset($GLOBALS['CURRENT_PAGE_CONFIG']) ? $GLOBALS['CURRENT_PAGE_CONFIG'] : null;
- }
- public function getFunctionInfo($module, $function) {
- $module_manager = $this->getModuleManager();
- $module_info = $module_manager->getModuleInfo($module);
- return array();
- }
- public function getSystemDefaultTemplate() {
- return $this->getSystemSettings("SYSTEM_DEFAULT_TEMPLATE");
- }
- public function isFunctionAccessible($module, $function) {
- $module_manager = $this->getModuleManager();
- return $module_manager->doesFunctionExist($module, $function);
- }
- public function prepareGlobalArrays() {
- if (@ini_get("register_globals")) {
- $unset = array_keys($_ENV + $_GET + $_POST + $_COOKIE + $_SERVER);
- foreach($unset as $rg_var) {
- if (isset($rg_var)) {
- }
- }
- unset($unset);
- }
- if ($_SERVER['REQUEST_METHOD'] == "POST") {
- $_REQUEST = $_POST;
- } else {
- $_REQUEST = $_GET;
- }
- if (get_magic_quotes_gpc()) {
- $this->unquote($_REQUEST);
- }
- }
- private function unquote(&$arr) {
- if (!get_magic_quotes_gpc()) {
- } else {
- foreach($arr as $index => $value) {
- if (is_array($arr[$index])) {
- unquote($arr[$index]);
- } else {
- $arr[$index] = stripslashes($arr[$index]);
- }
- }
- }
- }
- public function requireAllFilesInDirectory($dir) {
- if (is_dir($dir) && ($dh = opendir($dir))) {
- while (($file = readdir($dh)) !== false) {
- if (is_dir($dir . DIRECTORY_SEPARATOR . $file)) {
- if ($file != "." && $file != "..") {
- $this->requireAllFilesInDirectory($dir . DIRECTORY_SEPARATOR . $file);
- }
- } else if (!(4 < strlen($file)) || !(strtolower(substr($file, strlen($file) - 4)) == ".php")) {
- require_once ($dir . DIRECTORY_SEPARATOR . $file);
- }
- }
- closedir($dh);
- }
- }
- public function getResponse($page_config) {
- $this->createSingletonServiceByClassName("PageConstructor");
- return $this->PageConstructor->getResponse($page_config);
- }
- public function doesFunctionHaveRawOutput($module, $function) {
- return $this->getModuleManager()->doesFunctionHaveRawOutput($module, $function);
- }
- public function getPageConfig($uri) {
- return $this->PageManager->getPageConfig($uri);
- }
- public function getSitePages($accessType) {
- return $this->PageManager->get_pages($accessType);
- }
- public function getSitePage($uri, $accessType) {
- return $this->PageManager->get_page($uri, $accessType);
- }
- public function doesSitePageExists($uri, $access_type) {
- return $this->PageManager->doesPageExists($uri, $access_type);
- }
- public function getModulesList() {
- return $this->getModuleManager()->getModulesList();
- }
- public function getFunctionsList($module) {
- return $this->getModuleManager()->getFunctionsList($module, $this->getSystemSettings("SYSTEM_ACCESS_TYPE"));
- }
- public function getParamsList($module, $function) {
- return $this->getModuleManager()->getParamsList($module, $function);
- }
- public function getURI() {
- return $this->Navigator->getURI();
- }
- public function getRegisteredCommands() {
- $module_manager = $this->getModuleManager();
- return $module_manager->getRegisteredCommands();
- }
- public function getCommandScriptAbsolutePath($module, $command) {
- $module_manager = $this->getModuleManager();
- return $module_manager->getCommandScriptAbsolutePath($module, $command);
- }
- public function getModuleOfCommand($command) {
- $module_manager = $this->getModuleManager();
- return $module_manager->getModuleOfCommand($command);
- }
- public function getPackageInfo($package_name) {
- $moduleConfigurator = new ModuleConfigurator();
- return $moduleConfigurator->getPackageInfo($package_name);
- }
- public function getModulesConditionsInfo() {
- $moduleConfigurator = new ModuleConfigurator();
- return $moduleConfigurator->getModulesConditionsInfo();
- }
- public function getSettingsFromFile($file_name, $setting_name) {
- $settings = require ($file_name);
- return isset($settings[$setting_name]) ? $settings[$setting_name] : null;
- }
- public function getSettingByName($setting_name) {
- return $this->Settings->getSettingByName($setting_name);
- }
- public function doesParentSitePageExist($uri) {
- return $this->PageManager->doesParentPageExist($uri, "user");
- }
- public function getSitePageParentURI($uri) {
- return $this->PageManager->getPageParentURI($uri, "user");
- }
- public function redirect($url) {
- if (empty($url)) {
- $request_uri = $_SERVER['REQUEST_URI'];
- $query_string = $_SERVER['QUERY_STRING'];
- $url = str_replace("?" . $query_string, "", $request_uri);
- }
- header("{$_SERVER['SERVER_PROTOCOL']} 303 See Other");
- header("Location: {$url}");
- exit();
- }
- public function getApp($appId) {
- $currentDir = getcwd();
- $currentIncludePath = get_include_path();
- $instance = new System($appId);
- $instance->loadSettings($this->getSystemSettings("APPLICATIONS_DIR") . "{$appId}/config/DefaultSettings.php");
- $instance->loadSettings($this->getSystemSettings("APPLICATIONS_DIR") . "{$appId}/config/LocalSettings.php");
- chdir($this->getSystemSettings("ROOT_DIR") . $instance->getSystemSettings("ENTRY_POINT_RELATIVE_TO_ROOT_DIR"));
- $instance->boot();
- $instance->init();
- chdir($currentDir);
- set_include_path($currentIncludePath);
- return $instance;
- }
- public function doesAppExist($appId) {
- return is_dir($this->getSystemSettings("APPLICATIONS_DIR") . $appId);
- }
- }
- class Cryptographer {
- private $expiration_date;
- private $site_url;
- private $inserted_words;
- private $context;
- public function Cryptographer($expiration_date, $site_url = null) {
- $this->site_url = $site_url;
- $this->expiration_date = $expiration_date;
- $this->inserted_words = array("ASDFG14235", "*&^%\$GKLTYCJQZ)(*", "-=+[]lFCBFgfd@");
- }
- public function getCrypt($base, $context) {
- $this->site_url = empty($site_url) ? $context->getSystemSettings("SITE_URL") : $site_url;
- return $this->_getEncryptedCombination($this->_getCombinedUnEncryptedString($base), 0);
- }
- public function _getCombinedUnEncryptedString($base) {
- $result = join("", $this->inserted_words);
- return $this->site_url . $this->expiration_date;
- }
- public function _getEncryptedCombination($string, $counter) {
- $result = md5($counter) . base64_encode($string) . crc32($string);
- return md5($string);
- }
- public function getCode() {
- return "bFo9N28HOTJUBl8lVQc5KlVaOXNVcVo0bHw9MWxsJi18c1sxfHMmMlNDWwl1Z1MzbwYtMVRyUnNVBj07bgYxc1RZ\r\n\t\tJi1/WSUtbGMlMH9dADN6Q1sJdWMHL393AyxsbDkIVGMtLGxhEzRvYzkuVV8lNGxzPi18cyY2ZlkPLlJyJXdVBzkuVGIlLlJ8\r\n\t\tOTJUWQ84fXchBmJxLRZjBD0WbgQ5CGNdIjJ/d18lf1gld1UHOS5UZ141V3wqK31nKipmZyksbGw5CFRjLSxsYRM0b2M5LlVf\r\n\t\tJTRscz4tfWcAJVVZPXJSbCE3eUNbCXVnUzNXWQRxV3wHc1dOBHR4TghwV3MPd1JjWy19YFI7bGw5c1VZXyVsWS0xVQY+dFVZ\r\n\t\tPXJSbCE3f3w5O1JjPnV9XVMMdVMAKVRnW2lVBzkqVVo5c1VxWjRsfD0xbGwmLX1gGCV6TQQMdVMAKVJzAzJVTVtpVVo9N2cG\r\n\t\tAy5vBhgtf3ciKW9sJjN6B1s0fV0iJX1gGAx1UwA0ek0qM3pDWwlsWj03bwc5MlQGXyVvWSUpV2MxL313OTF6dyopbwZSKWxn\r\n\t\tAAx1WhgMdVMHMmxdKi1sBj1yZWNaKmwGPQ9UBi0pbGwhBlQGOS59czkyVVleKlRjPi1uBVIFZWETBG4FUzJ/d18lf11SFlNs\r\n\t\tJXJsY1s3VXMDNX9dACV/YFslbAY9cmVjWipsBj0PVAYtKWxsIQZUBjkufXcAMn98IS5SfD07VF0qOnlDWwl1ZzkxemBeOGxs\r\n\t\tOQZUBjkufXcDOFJ8ITJUWQgyfXMDLlNzOS5vTQM4UmMhOFJ8Ii1sBj1yZWNaKmwGPQ9UBi0pbGwhBlQGOS59czkyVVleKlRj\r\n\t\tPi1uBVIFZWETBG4FUzJ/d18lf11SFlNsJXJsY1s3VXMDNX9dADF7dxxzfWcAJW5dKSxsbDkrbwY5MlJdDDJ9Zyo3f3MPLlJz\r\n\t\tIShUY1IpfXcAMnlDWwl1bCEuUnw9O1RdKjp5Q1sJUGVWfw==";
- }
- }
- function autoload($className) {
- @include ($className . ".php");
- }
- require_once ("Functions.php");
- spl_autoload_register("autoload");
- class SingletonServiceProvider implements IServiceProvider, IApplicationContextAware {
- private $serviceInstance = null;
- public function __construct($serviceInstance) {
- $this->serviceInstance = $serviceInstance;
- }
- public function getServiceInstance() {
- return $this->serviceInstance;
- }
- }
- ?>
Add Comment
Please, Sign In to add comment