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


PHP MetaModel::Startup方法代码示例

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


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

示例1: InitDataModel

 /**
  * Helper function to initialize the ORM and load the data model
  * from the given file
  * @param $oConfig object The configuration (volatile, not necessarily already on disk)
  * @param $bModelOnly boolean Whether or not to allow loading a data model with no corresponding DB 
  * @return none
  */
 public function InitDataModel($oConfig, $bModelOnly = true, $bUseCache = false)
 {
     require_once APPROOT . '/core/log.class.inc.php';
     require_once APPROOT . '/core/kpi.class.inc.php';
     require_once APPROOT . '/core/coreexception.class.inc.php';
     require_once APPROOT . '/core/dict.class.inc.php';
     require_once APPROOT . '/core/attributedef.class.inc.php';
     require_once APPROOT . '/core/filterdef.class.inc.php';
     require_once APPROOT . '/core/stimulus.class.inc.php';
     require_once APPROOT . '/core/MyHelpers.class.inc.php';
     require_once APPROOT . '/core/expression.class.inc.php';
     require_once APPROOT . '/core/cmdbsource.class.inc.php';
     require_once APPROOT . '/core/sqlquery.class.inc.php';
     require_once APPROOT . '/core/dbobject.class.php';
     require_once APPROOT . '/core/dbobjectsearch.class.php';
     require_once APPROOT . '/core/dbobjectset.class.php';
     require_once APPROOT . '/application/cmdbabstract.class.inc.php';
     require_once APPROOT . '/core/userrights.class.inc.php';
     require_once APPROOT . '/setup/moduleinstallation.class.inc.php';
     $sConfigFile = $oConfig->GetLoadedFile();
     if (strlen($sConfigFile) > 0) {
         $this->log_info("MetaModel::Startup from {$sConfigFile} (ModelOnly = {$bModelOnly})");
     } else {
         $this->log_info("MetaModel::Startup (ModelOnly = {$bModelOnly})");
     }
     if (!$bUseCache) {
         // Reset the cache for the first use !
         MetaModel::ResetCache(md5(APPROOT) . '-' . $this->sTargetEnv);
     }
     MetaModel::Startup($oConfig, $bModelOnly, $bUseCache);
 }
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:38,代码来源:runtimeenv.class.inc.php

示例2: session_name

//   but WITHOUT ANY WARRANTY; without even the implied warranty of
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   GNU Affero General Public License for more details.
//
//   You should have received a copy of the GNU Affero General Public License
//   along with iTop. If not, see <http://www.gnu.org/licenses/>
/**
 * File to include to initialize the datamodel in memory
 *
 * @copyright   Copyright (C) 2010-2012 Combodo SARL
 * @license     http://opensource.org/licenses/AGPL-3.0
 */
require_once APPROOT . '/core/cmdbobject.class.inc.php';
require_once APPROOT . '/application/utils.inc.php';
session_name('itop-' . md5(APPROOT));
session_start();
if (isset($_REQUEST['switch_env'])) {
    $sEnv = $_REQUEST['switch_env'];
    $_SESSION['itop_env'] = $sEnv;
    // TODO: reset the credentials as well ??
} else {
    if (isset($_SESSION['itop_env'])) {
        $sEnv = $_SESSION['itop_env'];
    } else {
        $sEnv = ITOP_DEFAULT_ENV;
        $_SESSION['itop_env'] = ITOP_DEFAULT_ENV;
    }
}
$sConfigFile = APPCONF . $sEnv . '/' . ITOP_CONFIG_FILE;
MetaModel::Startup($sConfigFile);
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:30,代码来源:startup.inc.php

示例3: InitDataModel

function InitDataModel($sConfigFileName, $bModelOnly = true)
{
    require_once APPROOT . '/core/log.class.inc.php';
    require_once APPROOT . '/core/kpi.class.inc.php';
    require_once APPROOT . '/core/coreexception.class.inc.php';
    require_once APPROOT . '/core/dict.class.inc.php';
    require_once APPROOT . '/core/attributedef.class.inc.php';
    require_once APPROOT . '/core/filterdef.class.inc.php';
    require_once APPROOT . '/core/stimulus.class.inc.php';
    require_once APPROOT . '/core/MyHelpers.class.inc.php';
    require_once APPROOT . '/core/expression.class.inc.php';
    require_once APPROOT . '/core/cmdbsource.class.inc.php';
    require_once APPROOT . '/core/sqlquery.class.inc.php';
    require_once APPROOT . '/core/dbobject.class.php';
    if (file_exists(APPROOT . '/core/dbsearch.class.php')) {
        // iTop 2.2.0 or newer
        require_once APPROOT . '/core/dbsearch.class.php';
    } else {
        // Pre 2.2
        require_once APPROOT . '/core/dbobjectsearch.class.php';
    }
    require_once APPROOT . '/core/dbobjectset.class.php';
    require_once APPROOT . '/application/cmdbabstract.class.inc.php';
    require_once APPROOT . '/core/userrights.class.inc.php';
    require_once APPROOT . '/setup/moduleinstallation.class.inc.php';
    MetaModel::ResetCache();
    MetaModel::Startup($sConfigFileName, $bModelOnly, false);
}
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:28,代码来源:ajax.toolkit.php

示例4: DoPrepare

 public function DoPrepare()
 {
     parent::DoPrepare();
     MetaModel::Startup('../config-test-itopv06.php');
 }
开发者ID:besmirzanaj,项目名称:itop-code,代码行数:5,代码来源:testlist.inc.php

示例5: DoPrepare

 protected function DoPrepare()
 {
     $sConfigFile = APPROOT . $this->GetConfigFile();
     MetaModel::Startup($sConfigFile);
     // #@# Temporary disabled by Romain
     //		MetaModel::CheckDefinitions();
     // something here to create records... but that's another story
 }
开发者ID:henryavila,项目名称:itop,代码行数:8,代码来源:test.class.inc.php


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