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


PHP manager::getNewBoModel方法代碼示例

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


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

示例1: __construct

 function __construct($model, $session = "0", $clock = 0)
 {
     $this->clock = $clock;
     //0;
     wfDebugLog('p2p', $this->clock . ' - function logootEngine::__construct ');
     if (isset($model)) {
         $this->model = $model;
     } else {
         $this->model = manager::getNewBoModel();
     }
     $this->sessionid = $session;
 }
開發者ID:hala54,項目名稱:DSMW,代碼行數:12,代碼來源:logootEngine.php

示例2: loadModel

    /**
     *
     * @param <String> $rev_id Revision id
     * @return boModel
     */
    static function loadModel($rev_id)
    {
        try {
            if ($rev_id != 0) {
                $dao = new dao();
                return $dao->loadModel($rev_id);
            } else {
                return manager::getNewBoModel();
            }
        } catch (Exception $e) {
            throw new MWException(__METHOD__ . ' db access problems,
if this page existed before the DSMW installation,
maybe it has not been processed by DSMW');
        }
    }
開發者ID:hala54,項目名稱:DSMW,代碼行數:20,代碼來源:manager.php

示例3: test3

 function test3()
 {
     // Test Undo de la thèse
     $model = manager::getNewBoModel();
     $logoot = manager::getNewEngine($model, 3);
     $this->patch[1] = $logoot->generate($this->texte1, $this->texte2);
     $this->patch[2] = $logoot->generate($this->texte2, $this->texte3);
     $this->patch[3] = $logoot->generate($this->texte3, $this->texte4);
     $this->assertEquals($this->texte4, $model->getText());
     $txt1 = $model->getText();
     $invPatch = $logoot->undoPatch($this->patch[2]);
     $logoot->integrate($invPatch);
     $invinvPatch = $logoot->undoPatch($invPatch);
     $logoot->integrate($invinvPatch);
     $txt2 = $model->getText();
     $this->assertEquals(4, count($model->getPositionList()));
     $this->assertEquals(4, count($model->getLineList()));
     $this->assertEquals($this->texte4, $model->getText());
     $this->assertEquals($txt1, $txt2);
 }
開發者ID:hala54,項目名稱:DSMW,代碼行數:20,代碼來源:logootTest2.php


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