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


PHP CAppUI::readFiles方法代碼示例

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


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

示例1: loadExtras

 public function loadExtras(array $storage, CAppUI $AppUI, $m, $type = 'tabs')
 {
     //Set up extra $type
     if (!isset($storage['all_' . $type][$m])) {
         // For some reason on some systems if you don't set this up
         // first you get recursive pointers to the all_$type array, creating
         // phantom tabs.
         if (!isset($storage['all_' . $type])) {
             $storage['all_' . $type] = array();
         }
         $storage['all_' . $type][$m] = array();
         $all_items =& $storage['all_' . $type][$m];
         foreach ($AppUI->getActiveModules() as $dir => $module) {
             if (!canAccess($dir)) {
                 continue;
             }
             $modules_tabs = $AppUI->readFiles(W2P_BASE_DIR . '/modules/' . $dir . '/', '^' . $m . '_tab.*\\.php');
             foreach ($modules_tabs as $tab) {
                 // Get the name as the subextension
                 // cut the module_tab. and the .php parts of the filename
                 // (begining and end)
                 $nameparts = explode('.', $tab);
                 $filename = substr($tab, 0, -4);
                 if (count($nameparts) > 3) {
                     $file = $nameparts[1];
                     if (!isset($all_items[$file])) {
                         $all_items[$file] = array();
                     }
                     $tabArray =& $all_items[$file];
                     $name = $nameparts[2];
                 } else {
                     $tabArray =& $all_items;
                     $name = $nameparts[1];
                 }
                 $tabArray[] = array('name' => ucfirst(str_replace('_', ' ', $name)), 'file' => W2P_BASE_DIR . '/modules/' . $dir . '/' . $filename, 'module' => $dir);
             }
         }
     } else {
         $all_items =& $storage['all_' . $type][$m];
     }
 }
開發者ID:viniciusbudines,項目名稱:sisnuss,代碼行數:41,代碼來源:PageHandler.class.php

示例2: CSmartyDP

<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage Cabinet
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::check();
// Chargement de la liste des icones presents dans le fichier
$icones = CAppUI::readFiles("modules/dPcabinet/images/categories", ".png");
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("icones", $icones);
$smarty->display("icone_selector.tpl");
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:18,代碼來源:icone_selector.php

示例3: foreach

    }
}
if ($categories = @CAppUI::conf($module)) {
    foreach ($categories as $category => $values) {
        addConfigConfigCategory($module, $category, $values);
    }
}
if ($module == "system") {
    foreach (CAppUI::conf() as $chapter => $values) {
        if (!CModule::exists($chapter) && $chapter != "db") {
            addConfigConfigCategory(null, $chapter, $values);
        }
    }
}
if ($module != "common") {
    $files = CAppUI::readFiles("modules/{$module}", '\\.php$');
    addLocale("Module", "Name", "module-{$module}-court");
    addLocale("Module", "Name", "module-{$module}-long");
    foreach ($files as $_file) {
        $_tab = substr($_file, 0, -4);
        if (in_array($_tab, array("setup", "index", "config", "preferences", "configuration"))) {
            continue;
        }
        addLocale("Module", "Tabs", "mod-{$module}-tab-{$_tab}");
    }
}
$empty_locales = array_fill(0, 5, null);
foreach ($all_locales as &$_locale) {
    $_locale = str_replace(array('\\n', '\\t'), array("\n", "\t"), $_locale);
}
$completion = round(100 * $local_count / $total_count);
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:31,代碼來源:mnt_traduction_classes.php

示例4: CHPrimXMLEvenementsPmsi

    CAppUI::stepAjax("{$count} fichiers '{$type}' à passer en échanges HPRIM");
} else {
    if ($count <= 0) {
        CAppUI::stepAjax("Aucun fichier à passer en échange HPRIM", UI_MSG_ERROR);
    }
    $evt = $class = null;
    if ($type == "pmsi") {
        $domEvenement = new CHPrimXMLEvenementsPmsi();
        $evt = "evenementsPMSI";
    } elseif ($type == "actes") {
        $domEvenement = new CHPrimXMLEvenementsServeurActes();
        $evt = "evenementsServeurActes";
    } else {
        CAppUI::stepAjax("Type de l'échange invalide", UI_MSG_ERROR);
    }
    $files = CAppUI::readFiles($path);
    ini_set("memory_limit", "512M");
    CApp::setTimeLimit(360);
    CMbObject::$useObjectCache = false;
    $counter = 0;
    foreach ($files as $_file) {
        $xmlfile = file_get_contents("{$path}/{$_file}");
        // Chargement du fichier XML
        $domEvenement->loadXML($xmlfile);
        // Création de l'échange
        $echg_hprim = new CEchangeHprim();
        $data = $domEvenement->getEnteteEvenementXML($evt);
        $data = array_merge($data, $domEvenement->getContentsXML());
        $dest_hprim = new CDestinataireHprim();
        $dest_hprim->register($data['idClient']);
        $echg_hprim->date_production = $data['dateHeureProduction'];
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:ajax_file_to_echange.php


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