Changeset View
Changeset View
Standalone View
Standalone View
src/__phutil_library_init__.php
Show All 11 Lines | function __phutil_autoload($class_name) { | ||||
// Occurs in PHP 5.2 with `call_user_func(array($this, 'self::f'))`. | // Occurs in PHP 5.2 with `call_user_func(array($this, 'self::f'))`. | ||||
if ($class_name === 'self' || $class_name === 'parent') { | if ($class_name === 'self' || $class_name === 'parent') { | ||||
return; | return; | ||||
} | } | ||||
try { | try { | ||||
$loader = new PhutilSymbolLoader(); | $loader = new PhutilSymbolLoader(); | ||||
$symbols = $loader | $symbols = $loader | ||||
->setType('class') | |||||
->setName($class_name) | ->setName($class_name) | ||||
->selectAndLoadSymbols(); | ->selectAndLoadSymbols(); | ||||
if (!$symbols) { | if (!$symbols) { | ||||
throw new PhutilMissingSymbolException( | throw new PhutilMissingSymbolException( | ||||
$class_name, | $class_name, | ||||
pht('class or interface'), | pht('class or interface'), | ||||
pht( | pht( | ||||
Show All 20 Lines |