ACC SHELL

Path : /srv/www/vhosts/alfa-com/engine/
File Upload :
Current File : /srv/www/vhosts/alfa-com/engine/Site.php

<?php
	// Author: Jakub Macek, CZ; Copyright: Poski.com s.r.o.; Code is 100% my work. Do not copy.
	
	class Site
	{
		private static $current = null;
		
		public static function current()
		{
			if (self::$current === null)
				self::$current = new Site();
			return self::$current;
		}
		
		public function __get($key)
		{
			return $this->get($key);
		}
		
		public function __set($key, $value)
		{
			$this->set($key, $value);
		}
		
		public function get($key, $value = null)
		{
			if (isset($GLOBALS['site'][$key]))
				return $GLOBALS['site'][$key];
			else
				return $value;
		}
		
		public function set($key, $value)
		{
			if ($value === null)
				unset($GLOBALS['site'][$key]);
			else
				$GLOBALS['site'][$key] = $value;
		}
	}
	
	function site()
	{
		return Site::current();
	}
?>

ACC SHELL 2018