本文整理汇总了PHP中Installer::getRequiredVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP Installer::getRequiredVersion方法的具体用法?PHP Installer::getRequiredVersion怎么用?PHP Installer::getRequiredVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Installer
的用法示例。
在下文中一共展示了Installer::getRequiredVersion方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testInstallerCheckVersion
public function testInstallerCheckVersion()
{
$this->assertTrue(Installer::checkVersion());
$this->assertFalse(Installer::checkVersion('4'));
$ver = Installer::getRequiredVersion();
$ver = $ver['php'] + 0.1;
$this->assertTrue(Installer::checkVersion($ver));
}
示例2: step1
/**
* Step 1 - Check system requirements
*/
private function step1()
{
$this->setViewTemplate('install.step1.tpl');
// php version check
$php_compat = false;
if ($this->installer->checkVersion()) {
$php_compat = true;
}
$this->addToView('php_compat', $php_compat);
$requiredVersion = $this->installer->getRequiredVersion();
$this->addToView('php_required_version', $requiredVersion['php']);
// libs check
if (isset($this->reqs)) {
//testing only
$libs = $this->installer->checkDependency($this->reqs);
} else {
$libs = $this->installer->checkDependency();
}
$libs_compat = true;
foreach ($libs as $lib) {
if (!$lib) {
$libs_compat = false;
}
}
$this->addToView('libs', $libs);
// path permissions check
$permissions = $this->installer->checkPermission();
$this->addToView('permission', $permissions);
$permissions_compat = true;
foreach ($permissions as $perm) {
if (!$perm) {
$permissions_compat = false;
}
}
$this->addToView('permissions_compat', $permissions_compat);
$this->addToView('writable_data_directory', FileDataManager::getDataPath());
// session save path permissions check
$session_permissions_compat = $this->installer->isSessionDirectoryWritable();
$this->addToView('session_permissions_compat', $session_permissions_compat);
$this->addToView('writable_session_save_directory', ini_get('session.save_path'));
// other vars set to view
$requirements_met = $php_compat && $libs_compat && $permissions_compat && $session_permissions_compat;
$this->addToView('requirements_met', $requirements_met);
$this->addToView('subtitle', 'Check System Requirements');
//If all requirements are met, go to step 2
if ($requirements_met) {
$this->addSuccessMessage("<strong>Great!</strong> Your system has everything it needs to run ThinkUp.", null, true);
$this->step2();
}
}
示例3: step1
/**
* Step 1 - Check system requirements
*/
private function step1()
{
$this->setViewTemplate('install.step1.tpl');
// php version check
$php_compat = false;
if ($this->installer->checkVersion()) {
$php_compat = true;
}
$this->addToView('php_compat', $php_compat);
$requiredVersion = $this->installer->getRequiredVersion();
$this->addToView('php_required_version', $requiredVersion['php']);
// libs check
if (isset($this->reqs)) {
//testing only
$libs = $this->installer->checkDependency($this->reqs);
} else {
$libs = $this->installer->checkDependency();
}
$libs_compat = true;
foreach ($libs as $lib) {
if (!$lib) {
$libs_compat = false;
}
}
$this->addToView('libs', $libs);
// path permissions check
$permissions = $this->installer->checkPermission();
$this->addToView('permission', $permissions);
$permissions_compat = true;
foreach ($permissions as $perm) {
if (!$perm) {
$permissions_compat = false;
}
}
$this->addToView('permissions_compat', $permissions_compat);
$writeable_directories = array('compiled_view' => $this->view_mgr->compile_dir, 'cache' => $this->view_mgr->compile_dir . 'cache');
$this->addToView('writeable_directories', $writeable_directories);
// other vars set to view
$requirements_met = $php_compat && $libs_compat && $permissions_compat;
$this->addToView('requirements_met', $requirements_met);
$this->addToView('subtitle', 'Check System Requirements');
//If all requirements are met, go to step 2
if ($requirements_met) {
$this->addSuccessMessage("<strong>Great!</strong> Your system has everything it needs to run ThinkUp.", null, true);
$this->step2();
}
}
示例4: step1
/**
* Step 1 - Check system requirements
*/
private function step1() {
$this->setViewTemplate('install.step1.tpl');
// php version check
$php_compat = 0;
if ( $this->installer->checkVersion() ) {
$php_compat = 1;
}
$this->addToView('php_compat', $php_compat);
$requiredVersion = $this->installer->getRequiredVersion();
$this->addToView('php_required_version', $requiredVersion['php']);
// libs check
$libs = $this->installer->checkDependency();
$libs_compat = true;
foreach ($libs as $lib) {
if (!$lib) {
$libs_compat = false;
}
}
$this->addToView('libs', $libs);
// path permissions check
$permissions = $this->installer->checkPermission();
$this->addToView('permission', $permissions);
$permissions_compat = true;
foreach ($permissions as $perm) {
if (!$perm) {
$permissions_compat = false;
}
}
$this->addToView('permissions_compat', $permissions_compat);
$writeable_directories = array(
'compiled_view' => $this->view_mgr->compile_dir,
'cache' => $this->view_mgr->compile_dir . 'cache');
$this->addToView('writeable_directories', $writeable_directories);
// other vars set to view
$requirements_met = ($php_compat && $libs_compat && $permissions_compat);
$this->addToView('requirements_met', $requirements_met);
$this->addToView('subtitle', 'Check System Requirements');
}