本文整理匯總了PHP中IEM::isInstalled方法的典型用法代碼示例。如果您正苦於以下問題:PHP IEM::isInstalled方法的具體用法?PHP IEM::isInstalled怎麽用?PHP IEM::isInstalled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IEM
的用法示例。
在下文中一共展示了IEM::isInstalled方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Constructor
* Doesn't do anything.
*
* @return Void Doesn't return anything.
*/
public function __construct()
{
// if iem is already installed, then we redirect to the home page
if (IEM::isInstalled()) {
header('Locatin: index.php');
exit;
}
$this->_api = new IEM_Installer();
}
示例2: while
// If the user have not logged in yet, we need to check for "IEM_CookieLogin"
// and "IEM_LoginPreference" cookie. This cookie is used in "remember me" feature.
//
// TODO refactor this to IEM::login() function
// --------------------------------------------------------------------------------
if (!IEM::getCurrentUser()) {
$tempValid = false;
$tempCookie = false;
$tempUser = false;
// This is not a loop, rather a way to "return early" to avoid nested if
// * Comment from a later developer: If you have to do this, there is
// * probably a better way to code it. Programming doesn't necessarily
// * mean "hacking".
while (true) {
// if we are installing or upgrading then we need to bypass this
if (!IEM::isInstalled() && IEM::isInstalling() || IEM::hasUpgrade() && IEM::isUpgrading() || IEM::isCompletingUpgrade()) {
$tempValid = true;
break;
}
// Get cookie
$tempCookie = IEM::requestGetCookie('IEM_CookieLogin', array());
if (empty($tempCookie)) {
break;
}
// Check if cookie contains user information
if (!is_array($tempCookie) || !isset($tempCookie['user'])) {
break;
}
// Get user
$tempUser = new User_API();
$tempUser->Load(intval($tempCookie['user']));