本文整理汇总了PHP中Tiki_Profile::getPath方法的典型用法代码示例。如果您正苦于以下问题:PHP Tiki_Profile::getPath方法的具体用法?PHP Tiki_Profile::getPath怎么用?PHP Tiki_Profile::getPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tiki_Profile
的用法示例。
在下文中一共展示了Tiki_Profile::getPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: install
/**
* Install a profile
*
* @param Tiki_Profile $profile Profile object
* @param string $empty_cache all|templates_c|temp_cache|temp_public|modules_cache|prefs (default all)
*/
function install(Tiki_Profile $profile, $empty_cache = 'all')
{
global $tikidomain;
$cachelib = TikiLib::lib('cache');
$tikilib = TikiLib::lib('tiki');
try {
// Apply directives, note Directives should be and are a runtime thing
$yamlDirectives = new Yaml_Directives(new Yaml_Filter_ReplaceUserData($profile, $this->userData), $profile->getPath());
$data = $profile->getData();
$yamlDirectives->process($data);
$profile->setData($data);
$profile->fetchExternals();
// there might be new externals as a result of the directives processing
$profile->getObjects();
// need to be refreshed before installation in case any have changed due to replacements
if (!($profiles = $this->getInstallOrder($profile))) {
return false;
}
foreach ($profiles as $p) {
$this->doInstall($p);
}
if (count($this->getFeedback()) == count($profiles)) {
$this->setFeedback(tra('Nothing was changed. Please check the profile for errors'));
}
$cachelib->empty_cache($empty_cache, 'profile');
return true;
} catch (Exception $e) {
$this->setFeedback(tra('An error occurred: ') . $e->getMessage());
return false;
}
}