当前位置: 首页>>代码示例>>PHP>>正文


PHP JInstaller::setUpgrade方法代码示例

本文整理汇总了PHP中JInstaller::setUpgrade方法的典型用法代码示例。如果您正苦于以下问题:PHP JInstaller::setUpgrade方法的具体用法?PHP JInstaller::setUpgrade怎么用?PHP JInstaller::setUpgrade使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JInstaller的用法示例。


在下文中一共展示了JInstaller::setUpgrade方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testIsAndSetUpgrade

 /**
  * @covers  JInstaller::setUpgrade
  * @covers  JInstaller::isUpgrade
  */
 public function testIsAndSetUpgrade()
 {
     $this->object->setUpgrade(false);
     $this->assertThat($this->object->isUpgrade(), $this->equalTo(false), 'Get or Set Upgrade failed');
     $this->assertThat($this->object->setUpgrade(true), $this->equalTo(false), 'setUpgrade did not return the old value properly.');
     $this->assertThat($this->object->isUpgrade(), $this->equalTo(true), 'getUpgrade did not return the expected value.');
 }
开发者ID:nprasath002,项目名称:joomla-platform,代码行数:11,代码来源:JInstallerTest.php

示例2: testGetAndSetUpgrade

 /**
  * @todo Implement testGetOverwrite().
  */
 public function testGetAndSetUpgrade()
 {
     $this->saveFactoryState();
     $newDbo = $this->getMock('test');
     JFactory::$database =& $newDbo;
     $this->object = JInstaller::getInstance();
     $this->object->setUpgrade(false);
     $this->assertThat($this->object->getUpgrade(), $this->equalTo(false), 'Get or Set Upgrade failed');
     $this->assertThat($this->object->setUpgrade(true), $this->equalTo(false), 'setUpgrade did not return the old value properly.');
     $this->assertThat($this->object->getUpgrade(), $this->equalTo(true), 'getUpgrade did not return the expected value.');
     $this->restoreFactoryState();
 }
开发者ID:exntu,项目名称:joomla-cms,代码行数:15,代码来源:JInstallerTest.php

示例3: update

 /**
  * Generic update method for extensions
  *
  * @return  boolean  True on success
  *
  * @since   3.4
  */
 public function update()
 {
     // Set the overwrite setting
     $this->parent->setOverwrite(true);
     $this->parent->setUpgrade(true);
     // And make sure the route is set correctly
     $this->setRoute('update');
     // Now jump into the install method to run the update
     return $this->install();
 }
开发者ID:Rai-Ka,项目名称:joomla-cms,代码行数:17,代码来源:adapter.php

示例4: installFrameworkAction

 public function installFrameworkAction()
 {
     $packageFile = JFactory::getConfig()->get('tmp_path') . '/jsn-tpl_framework.zip';
     // Checking downloaded template package
     if (!is_file($packageFile)) {
         throw new Exception(JText::_('JSN_TPLFW_ERROR_DOWNLOAD_PACKAGE_FILE_NOT_FOUND'));
     }
     // Load install library
     jimport('joomla.installer.helper');
     // Turn off debug mode to catch install error
     $conf = JFactory::getConfig();
     $conf->set('debug', 0);
     $unpackedInfo = JInstallerHelper::unpack($packageFile);
     $installer = new JInstaller();
     $installer->setUpgrade(true);
     $installResult = $installer->install($unpackedInfo['dir']);
     // Clean up temporary data
     JInstallerHelper::cleanupInstall($packageFile, $unpackedInfo['dir']);
     // Clean up compressed files
     $this->_cleanCache();
     // Send error if install is failure
     if (class_exists('JError')) {
         $error = JError::getError();
         if (!empty($error)) {
             throw $error;
         }
     }
 }
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:28,代码来源:update.php


注:本文中的JInstaller::setUpgrade方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。