本文整理匯總了PHP中think\Think::addMap方法的典型用法代碼示例。如果您正苦於以下問題:PHP Think::addMap方法的具體用法?PHP Think::addMap怎麽用?PHP Think::addMap使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類think\Think
的用法示例。
在下文中一共展示了Think::addMap方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: run
public function run(&$params)
{
if (IS_CLI) {
if (!function_exists('pcntl_signal')) {
E("pcntl_signal not working.\nRepl mode based on Linux OS or PHP for OS X(http://php-osx.liip.ch/)\n");
}
Think::addMap(array('Boris\\Boris' => VENDOR_PATH . 'Boris/Boris.php', 'Boris\\Config' => VENDOR_PATH . 'Boris/Config.php', 'Boris\\CLIOptionsHandler' => VENDOR_PATH . 'Boris/CLIOptionsHandler.php', 'Boris\\ColoredInspector' => VENDOR_PATH . 'Boris/ColoredInspector.php', 'Boris\\DumpInspector' => VENDOR_PATH . 'Boris/DumpInspector.php', 'Boris\\EvalWorker' => VENDOR_PATH . 'Boris/EvalWorker.php', 'Boris\\ExportInspector' => VENDOR_PATH . 'Boris/ExportInspector.php', 'Boris\\Inspector' => VENDOR_PATH . 'Boris/Inspector.php', 'Boris\\ReadlineClient' => VENDOR_PATH . 'Boris/ReadlineClient.php', 'Boris\\ShallowParser' => VENDOR_PATH . 'Boris/ShallowParser.php'));
$boris = new \Boris\Boris(">>> ");
$config = new \Boris\Config();
$config->apply($boris, true);
$options = new \Boris\CLIOptionsHandler();
$options->handle($boris);
$boris->onStart(sprintf("echo 'REPL MODE FOR THINKPHP \nTHINKPHP_VERSION: %s, PHP_VERSION: %s, BORIS_VERSION: %s\n';", THINK_VERSION, PHP_VERSION, $boris::VERSION));
$boris->start();
}
}