Changeset View
Changeset View
Standalone View
Standalone View
src/init/lib/moduleutils.php
Show All 30 Lines | |||||
function phutil_get_current_library_name() { | function phutil_get_current_library_name() { | ||||
$caller = head(debug_backtrace(false)); | $caller = head(debug_backtrace(false)); | ||||
$root = phutil_get_library_root_for_path($caller['file']); | $root = phutil_get_library_root_for_path($caller['file']); | ||||
return phutil_get_library_name_for_root($root); | return phutil_get_library_name_for_root($root); | ||||
} | } | ||||
/** | |||||
* Warns about use of deprecated behavior. | |||||
*/ | |||||
function phutil_deprecated($what, $why) { | |||||
PhutilErrorHandler::dispatchErrorMessage( | |||||
PhutilErrorHandler::DEPRECATED, | |||||
$what, | |||||
array( | |||||
'why' => $why, | |||||
)); | |||||
} | |||||
function phutil_load_library($path) { | function phutil_load_library($path) { | ||||
PhutilBootloader::getInstance()->loadLibrary($path); | PhutilBootloader::getInstance()->loadLibrary($path); | ||||
} | } |