當前位置: 首頁>>代碼示例>>PHP>>正文


PHP repository::get_user_file_tree方法代碼示例

本文整理匯總了PHP中repository::get_user_file_tree方法的典型用法代碼示例。如果您正苦於以下問題:PHP repository::get_user_file_tree方法的具體用法?PHP repository::get_user_file_tree怎麽用?PHP repository::get_user_file_tree使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在repository的用法示例。


在下文中一共展示了repository::get_user_file_tree方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: get_listing

 /**
  *
  * @global <type> $CFG
  * @param <type> $encodedpath
  * @param <type> $search
  * @return <type>
  */
 public function get_listing($encodedpath = '', $page = '', $search = '')
 {
     global $CFG;
     try {
         return repository::get_user_file_tree($search);
     } catch (Exception $e) {
         throw new repository_exception('emptyfilelist', 'repository_local');
     }
 }
開發者ID:nicolasconnault,項目名稱:moodle2.0,代碼行數:16,代碼來源:repository.class.php

示例2: getFileList

 /**
  * Retrieve file list for a user of the Moodle client calling this function
  * @global <type> $DB
  * @global <type> $USER
  * @global <type> $MNET_REMOTE_CLIENT
  * @global <type> $CFG
  * @param <type> $username
  * @param <type> $search
  * @return <type>
  */
 public function getFileList($username, $search)
 {
     global $DB, $USER, $MNET_REMOTE_CLIENT, $CFG;
     ///check the the user is known
     ///he has to be previously connected to the server site in order to be in the database
     //TODO: this seems weird - is it executed from cron or what? Please review
     $USER = $DB->get_record('user', array('username' => $username, 'mnethostid' => $MNET_REMOTE_CLIENT->id));
     if (empty($USER)) {
         exit(mnet_server_fault(9016, get_string('usernotfound', 'repository_remotemoodle', $username)));
     }
     try {
         return repository::get_user_file_tree($search);
     } catch (Exception $e) {
         exit(mnet_server_fault(9016, get_string('failtoretrievelist', 'repository_remotemoodle')));
     }
 }
開發者ID:nicolasconnault,項目名稱:moodle2.0,代碼行數:26,代碼來源:repository.class.php


注:本文中的repository::get_user_file_tree方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。