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


PHP Load::charg_chain_dans_tab方法代码示例

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


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

示例1: initerConstruct

 function initerConstruct($initercreated = array())
 {
     //simulation d'un initer avec les paramètres get
     $initer = $initercreated;
     //CREATE INITER
     //get chain connector
     $chainconnector = "none";
     //load chain connector
     if (file_exists("chain/connector.chain.default.php")) {
         include "chain/connector.chain.default.php";
         if (isset($firstchain) && file_exists("chain/connector.chain." . $firstchain . ".php")) {
             include "chain/connector.chain." . $firstchain . ".php";
             $chainconnector = $firstchain;
             //echo $firstchain;
         } else {
             $chainconnector = "default";
         }
     }
     //charge chains dans tab
     $chemin_chain = "chain";
     $loader = new Load();
     $chaintab = $loader->charg_chain_dans_tab($chemin_chain);
     //print_r($chaintab);
     //init initer
     $initer['chainconnector'] = $chainconnector;
     $initer['loader'] = $loader;
     $initer['chaintab'] = $chaintab;
     //test chain ok
     if ($chainconnector == "default" || $chainconnector == "none" || !isset($tabconnector)) {
         return $initer;
     }
     //start connector
     foreach ($tabconnector as $connectorcour) {
         $connectorlowercase = strtolower($connectorcour['name']);
         $connectorclass = ucfirst($connectorlowercase);
         if (!file_exists("connector/connector." . $connectorlowercase . ".php")) {
             continue;
         }
         include_once "connector/connector." . $connectorlowercase . ".php";
         eval("\$instanceConnector=new Connector" . $connectorclass . "(\$initer);");
         eval("\$instanceConnector" . $connectorclass . "=\$instanceConnector;");
         eval("\$instance" . $connectorclass . "=\$instanceConnector->initInstance();");
         ${$connectorlowercase} = $instanceConnector->initVar();
         //get modif du initer
         $initer = $instanceConnector->initer;
         //cas passage de class dans initer
         if (isset($connectorcour['classtoiniter']) && $connectorcour['classtoiniter']) {
             eval("\$initer['instance" . $connectorclass . "']=\$instance" . $connectorclass . ";");
         }
         //cas passage de var dans initer
         if (isset($connectorcour['vartoiniter']) && $connectorcour['vartoiniter']) {
             eval("\$initer['" . $connectorlowercase . "']=\$" . $connectorlowercase . ";");
         }
         //cas set variable ou classe spéciale (conf, db, tpl, ...)
         if (isset($connectorcour['aliasiniter']) && $connectorcour['aliasiniter'] != "none") {
             //class spéciale
             if (isset($connectorcour['classtoiniter']) && $connectorcour['classtoiniter'] && (!isset($connectorcour['vartoiniter']) || !$connectorcour['vartoiniter'])) {
                 eval("\$" . $connectorcour['aliasiniter'] . "=\$instance" . $connectorclass . ";");
                 eval("\$initer['" . $connectorcour['aliasiniter'] . "']=\$instance" . $connectorclass . ";");
             }
             //variable spéciale (prioritaire pour variable, écrase la classe si var et class sont utilisés)
             if (isset($connectorcour['vartoiniter']) && $connectorcour['vartoiniter']) {
                 eval("\$" . $connectorcour['aliasiniter'] . "=\$" . $connectorlowercase . ";");
                 eval("\$initer['" . $connectorcour['aliasiniter'] . "']=\$" . $connectorlowercase . ";");
             }
         }
         //echo "</pre>";print_r($initer['instanceDroit']);echo "</pre>";
         //pre exec
         $instanceConnector->reloadIniter($initer);
         $instanceConnector->preexec();
         $initer = $instanceConnector->initer;
     }
     //post exec connector
     /*		
     foreach($tabconnector as $connectorcour)
     {
     	$connectorlowercase=strtolower($connectorcour['name']);
     	$connectorclass=ucfirst($connectorlowercase);
     	
     	if(!file_exists("connector/connector.".$connectorlowercase.".php"))
     		continue;
     	
     	eval("\$instanceConnector=\$instanceConnector".$connectorclass.";");
     	//$instanceConnector->initer=$initer;
     	$instanceConnector->reloadIniter($initer);
     	$instanceConnector->postexec();
     	$initer=$instanceConnector->initer;
     	
     }
     */
     //...CREATE INITER
     $initercreated = $initer;
     return $initercreated;
 }
开发者ID:RoDKoDRoK,项目名称:RoDKoDRoK-core,代码行数:94,代码来源:class.deploy.php

示例2: Load

}
//include classes abstract
$chemin_classes = "abstract";
include $chemin_classes . "/class.load.php";
$loader = new Load();
$tab_class = $loader->charg_dossier_dans_tab($chemin_classes);
sort($tab_class);
//print_r($tab_class);
foreach ($tab_class as $class_to_load) {
    if (!strstr($class_to_load, "class.load.php")) {
        include $class_to_load;
    }
}
//charge chains dans tab
$chemin_chain = "chain";
$chaintab = $loader->charg_chain_dans_tab($chemin_chain);
//print_r($chaintab);
//init initer
$initer = array();
$initer['chainconnector'] = $chainconnector;
$initer['loader'] = $loader;
$initer['chaintab'] = $chaintab;
//cas appel php from console
if (isset($argv)) {
    $initer['argv'] = $argv;
}
//start connector
foreach ($tabconnector as $connectorcour) {
    $connectorlowercase = strtolower($connectorcour['name']);
    $connectorclass = ucfirst($connectorlowercase);
    if (!file_exists("connector/connector." . $connectorlowercase . ".php")) {
开发者ID:RoDKoDRoK,项目名称:RoDKoDRoK-core,代码行数:31,代码来源:index.php


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