本文整理匯總了PHP中ResourceLoaderContext::expandModuleNames方法的典型用法代碼示例。如果您正苦於以下問題:PHP ResourceLoaderContext::expandModuleNames方法的具體用法?PHP ResourceLoaderContext::expandModuleNames怎麽用?PHP ResourceLoaderContext::expandModuleNames使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ResourceLoaderContext
的用法示例。
在下文中一共展示了ResourceLoaderContext::expandModuleNames方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testexpandModuleNames
/**
* @dataProvider providePackedModules
*/
public function testexpandModuleNames($desc, $modules, $packed)
{
$this->assertEquals($modules, ResourceLoaderContext::expandModuleNames($packed), $desc);
}
示例2: dirname
if ( isset( $_SERVER['MW_COMPILED'] ) ) {
require ( 'phase3/includes/WebStart.php' );
} else {
require ( dirname( __FILE__ ) . '/includes/WebStart.php' );
}
// Construct a tag for newrelic -- wgRequest is global in this scope
if( function_exists( 'newrelic_name_transaction' ) ) {
if ( function_exists( 'newrelic_disable_autorum') ) {
newrelic_disable_autorum();
}
if (is_object($wgRequest)) {
$sharedWiki = (preg_match("/^slot[0-9]\$/",$wgDBname) || $wgDBname == 'devbox') ? "shared" : "local";
$only = $wgRequest->getVal( 'only', 'full' );
$modules = ResourceLoaderContext::expandModuleNames( $wgRequest->getVal( 'modules' ) );
if ( count( $modules ) > 2 ) {
$modules = count($modules) . '/' . $modules[0];
} else {
$modules = count($modules) . '/' . implode( ',', $modules );
}
newrelic_name_transaction( "/load/$sharedWiki/$only/$modules" );
if ( function_exists( 'newrelic_add_custom_parameter' ) ) {
newrelic_add_custom_parameter( 'skin', $wgRequest->getVal( 'skin' ) );
newrelic_add_custom_parameter( 'lang', $wgRequest->getVal( 'lang' ) );
}
}
}
wfProfileIn( 'load.php' );