set_exception_handler(
function ($e) {
echo 'Uncaught Throwable ', $e;
}
);
Uncaught Throwable Exception: Message in D:\��� �������\domains\site.local\index.php:11
Stack trace:
#0 {main}
class A
{
public $me;
public function getMe()
{
$x = $this->me;
return $x();
}
}
$a = new A;
$a->me = function() { return $this; };
var_dump($a->me->call($a)); // object(A)#1 (1) { ["me"]=> object(Closure)#2 (0) { } }
class A
{
}
$a = new A;
$closure = function() { return $this; };
var_dump($closure->call($a)); // object(A)#1 (0) { }
extension_dir = c:\php\ext\
$self = static::Class;
$self = get_called_class();
abstract class StaticFactory
{
protected static function getForNS($class_name, ...$args)
{
$self_class = '\\'.static::Class; // (Or get_called_class())
$ns = substr($self_class, 0, strrpos($self_class, '\\'));
$class_full_name = $ns.'\\'.$class_name;
return new $class_full_name(...$args);
}
public static function getDomainObjectAssembler()
{
$self = static::Class;
return self::getForNS('DomainObjectAssembler', static::Class);
}
}
Fatal error: Class 'asoft\menus\mapper\asoft\mapper\Mapper' not found in E:\OpenServer\domains\audiophilesoft.local\_classes\asoft\menus\mapper\Mapper.php on line 5
namespace {
function __autoload($class)
{
require_once str_replace("/", DIRECTORY_SEPARATOR, $_SERVER['DOCUMENT_ROOT'])
.DIRECTORY_SEPARATOR
.'classes'
.DIRECTORY_SEPARATOR
.$class.'.class.php';
}
}
class Configurator
{
static private $_instance = NULL;
private $ROOT;
private function __construct()
{
$this->ROOT = $_SERVER['DOCUMENT_ROOT'];
}
private function __clone()
{
}
public static function getInstance()
{
if (is_null(self::$_instance)) {
self::$_instance = new self;
}
return self::$_instance;
}
public final function __get($name)
{
return $this->$name;
}
}