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


PHP WebApp::rmDir方法代码示例

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


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

示例1: _removeModule

 /**
  * Uninstaller::_removeModule()
  * 
  * @return
  */
 public function _removeModule()
 {
     $this->parent->parent->logEvent($this::name_space, 'Successfully uninstalled module ' . $this->module_ns);
     if (WebApp::rmDir($this->module_dir)) {
         if (!is_dir($this->module_dir)) {
             return new ActionResult($this, '/admin/modules/uninstall/', 1, 'Uninstallation complete! Module has been removed.', B_T_SUCCESS, array('step' => 10, 'status' => 1, 'msg' => 'Uninstallation complete! Module has been removed.'));
         } else {
             $this->parent->parent->debug($this::name_space . ': Module directory still exists at "' . $this->module_dir . '"');
         }
     }
     return new ActionResult($this, '/admin/modules/uninstall/', 1, 'Failed to remove module directory, but module was still uninstalled!', B_T_WARNING, array('step' => 10, 'status' => 1, 'msg' => 'Failed to remove module directory, but module was still uninstalled!'));
 }
开发者ID:huwcbjones,项目名称:WebFramework,代码行数:17,代码来源:uninstall.php

示例2: _revertInstall

 /**
  * Installer::_revertInstall()
  * 
  * @return
  */
 private function _revertInstall()
 {
     $this->parent->parent->debug($this::name_space . ': Reverting install...');
     // Include the uninstaller (lazy again)
     require_once dirname(__FILE__) . '/uninstall.php';
     $uninstaller = new Uninstaller($this->parent);
     if ($this->step === null) {
         return false;
     }
     // Fetch the module ID (if applicable) as the uninstaller needs it
     $fetch_query = $this->mySQL_r->prepare("SELECT `module_id` FROM `core_modules` WHERE `namespace`=?");
     if ($fetch_query !== false) {
         $fetch_query->bind_param('s', $this->namespace);
         $fetch_query->bind_result($MOD_ID);
         $fetch_query->execute();
         $fetch_query->store_result();
         if ($fetch_query->num_rows == 1) {
             while ($fetch_query->fetch()) {
                 $mod_id = $MOD_ID;
             }
         } else {
             $mod_id = null;
         }
         $fetch_query->free_result();
     }
     // Work out the details
     $dir = __MODULE__ . '/' . strtolower($this->namespace);
     $details = array('dir' => $dir, 'id' => $mod_id, 'ns' => $this->namespace);
     // Call the uninstall steps
     switch ($this->step) {
         case 7:
         case 6:
             $uninstaller->uninstall(3, $details);
         case 5:
             $uninstaller->uninstall(4, $details);
         case 4:
             $uninstaller->uninstall(6, $details);
         case 3:
             $uninstaller->uninstall(7, $details);
         case 2:
             $uninstaller->uninstall(8, $details);
         case 1:
             $this->parent->parent->debug($this::name_space . ': Removing "' . str_replace(__EXECDIR__, '', $this->tempModule) . '"');
             WebApp::rmDir($this->tempModule);
             break;
     }
 }
开发者ID:huwcbjones,项目名称:WebFramework,代码行数:52,代码来源:install.php

示例3: _cleanUpdate

 /**
  * Updater::_cleanUpdate()
  * 
  * @return
  */
 private function _cleanUpdate()
 {
     $this->parent->parent->logEvent($this::name_space, 'Successfully updated module ' . $this->module_ns);
     if (WebApp::rmDir($this->update_dir)) {
         $tempDir = __TEMP__ . '/' . strtolower($this->module_ns) . '.bak';
         if (WebApp::rmDir($tempDir)) {
             return new ActionResult($this, '/admin/modules/install/', 1, 'Update complete!', B_T_SUCCESS, array('step' => 11, 'status' => 1, 'msg' => 'Update complete!'));
         }
     }
     return new ActionResult($this, '/admin/modules/install/', 0, 'Failed to clean up update, but module was still updated!', B_T_WARNING, array('step' => 11, 'status' => 1, 'msg' => 'Failed to clean up update, but module was still updated!'));
 }
开发者ID:huwcbjones,项目名称:WebFramework,代码行数:16,代码来源:update.php


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