本文整理汇总了PHP中Bootstrap::ExpandPath方法的典型用法代码示例。如果您正苦于以下问题:PHP Bootstrap::ExpandPath方法的具体用法?PHP Bootstrap::ExpandPath怎么用?PHP Bootstrap::ExpandPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bootstrap
的用法示例。
在下文中一共展示了Bootstrap::ExpandPath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: LoadTemplate
/**
* Load a template
*
* @author Fernando Ontiveros Lira <fernando@colosa.com>
* @access public
* @param string $strTemplateName
* @return void
*/
public function LoadTemplate($strTemplateName)
{
if ($strTemplateName == '') {
return;
}
$temp = $strTemplateName . ".php";
$file = Bootstrap::ExpandPath('templates') . $temp;
// Check if its a user template
if (file_exists($file)) {
//require_once( $file );
include $file;
} else {
// Try to get the global system template
$file = PATH_TEMPLATE . PATH_SEP . $temp;
//require_once( $file );
if (file_exists($file)) {
include $file;
}
}
}
示例2: explode
if ($oPluginRegistry->isRegisteredFolder( SYS_COLLECTION )) {
$phpFile = PATH_PLUGINS . SYS_COLLECTION . PATH_SEP . SYS_TARGET . '.php';
$targetPlugin = explode( '/', SYS_TARGET );
$collectionPlugin = $targetPlugin[0];
$avoidChangedWorkspaceValidation = true;
} else {
$phpFile = Bootstrap::ExpandPath( 'methods' ) . SYS_COLLECTION . PATH_SEP . SYS_TARGET . '.php';
}
// services is a special folder,
if (SYS_COLLECTION == 'services') {
$avoidChangedWorkspaceValidation = true;
$targetPlugin = explode( '/', SYS_TARGET );
if ($targetPlugin[0] == 'webdav') {
$phpFile = Bootstrap::ExpandPath( 'methods' ) . SYS_COLLECTION . PATH_SEP . 'webdav.php';
}
}
if (SYS_COLLECTION == 'login' && SYS_TARGET == 'login') {
$avoidChangedWorkspaceValidation = true;
}
$bWE = false;
$isControllerCall = false;
$isPluginController = false;
if (substr( SYS_COLLECTION, 0, 8 ) === 'gulliver') {
$phpFile = PATH_GULLIVER_HOME . 'methods/' . substr( SYS_COLLECTION, 8 ) . SYS_TARGET . '.php';
} else {
//when the file is part of the public directory of any PROCESS, this a ProcessMaker feature