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


PHP TMS函數代碼示例

本文整理匯總了PHP中TMS函數的典型用法代碼示例。如果您正苦於以下問題:PHP TMS函數的具體用法?PHP TMS怎麽用?PHP TMS使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


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

示例1: classNameInstanceOfBaseObject

 public static function classNameInstanceOfBaseObject($className)
 {
     $obj = Factory::createObject($className);
     if ($obj instanceof BaseObject === false) {
         throw new BaseException(TMS(BaseException::CLASS_NOT_INSTANCEOF_BASOBJECT, array('class' => $className)));
     }
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:7,代碼來源:Check.php

示例2: setSelectedLanguage

 /**
  * set a language for displaying
  *
  * @param $language
  * @throws BaseException
  */
 public function setSelectedLanguage($language)
 {
     if (in_array($language, $this->getPossibleLanguages()) === false) {
        throw new BaseException(TMS(BaseException::LANGUAGE_NOT_SUPPORTED, array('language' => $language)));
     }
     $this->selectedLanguage = $language;
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:13,代碼來源:Language.php

示例3: validateParams

 /**
  * @throws base_exception_Validation
  */
 public function validateParams()
 {
     parent::validateParams();
     if (is_null($this->requestHelper->getParam('class'))) {
         throw new base_exception_Site(TMS(base_exception_Site::MISSING_PARAM, ['name' => 'class']));
     }
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:10,代碼來源:BaseObject.php

示例4: __construct

 public function __construct(BaseObject $obj)
 {
     if ($this->checkObjClass($obj) == false) {
         throw new base_displayclass_Exception(TMS(base_displayclass_Exception::NOT_SUPPORTED_CLASS, array('class' => get_class($obj), 'displayClass' => get_class($this))));
     }
     $this->obj = $obj;
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:7,代碼來源:DisplayClass.php

示例5: getColumn

 /**
  * @param $colName
  * @return base_database_Column
  * @throws base_database_Exception
  */
 public function getColumn($colName)
 {
     if ($this->existsColumn($colName) === false) {
         throw new base_database_Exception(TMS(base_database_Exception::TABLE_COLUMN_NOT_EXISTS, array('colName' => $colName, 'tableName' => $this->name)));
     }
     return $this->cols[$colName];
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:12,代碼來源:Table.php

示例6: setValue

 /**
  * set a new int value
  *
  * @param int $value
  * @throws base_database_Exception
  */
 public function setValue($value)
 {
     if (is_int($value) === false) {
         throw new base_database_Exception(TMS(base_database_Exception::NO_INT_VALUE, array('value' => $value)));
     }
     $this->int = $value;
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:13,代碼來源:Int.php

示例7: __construct

 /**
  * @throws base_exception_CMD
  */
 public function __construct()
 {
     if (!isset($GLOBALS['argv'])) {
         throw new base_exception_CMD(TMS(base_exception_CMD::NO_CMD_CALL));
     }
     $this->setParams();
     $this->model = $this->getModel();
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:11,代碼來源:Controller.php

示例8: toString

 /**
  * generate sql string
  * @return string
  * @throws base_database_Exception
  */
 public function toString()
 {
     if (empty($this->columns)) {
         throw new base_database_Exception(TMS(base_database_Exception::NO_COLS_ADDED, array('tableName', $this->name)));
     }
     $sql = 'CREATE TABLE IF NOT EXISTS ' . $this->name . ' (';
     $sql .= implode(', ', $this->columns) . ')';
     return $sql;
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:14,代碼來源:Table.php

示例9: setTableData

 /**
  * @param array $data
  * @throws base_exception_BasePDF
  */
 public function setTableData(array $data)
 {
     foreach ($data as $obj) {
         if (!$obj instanceof BaseObject) {
             throw new base_exception_BasePDF(TMS(base_exception_BasePDF::DATA_NO_INSTANCEOF_BASEOBJECT));
         }
     }
     $this->data = $data;
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:13,代碼來源:PDFCreator.php

示例10: createObject

 /**
  * get a new instance of the given className
  *
  * @param $className
  * @return BaseObject
  * @throws BaseException
  */
 public static function createObject($className, BaseObject $obj)
 {
     Check::className($className);
     $dPObj = new $className($obj);
     if (!$dPObj instanceof DataPermission) {
         throw new base_exception_DataPermission(TMS(base_exception_DataPermission::FACTORY_NO_INSTANCE_OF_DP));
     }
     return $dPObj;
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:16,代碼來源:Factory.php

示例11: toStringTest

    /**
     * @param $value
     * @param $expectedException
     * @throws base_database_Exception
     *
     * @test
     * @dataProvider toStringTestDataProvider
     */
    public function toStringTest($value, $expectedException)
    {
        if ($expectedException === true) {
            $this->setExpectedException('base_database_Exception', TMS(base_database_Exception::NO_INT_VALUE, array('value' => $value)));
        }

        $term = new base_database_term_Int();
        $term->setValue($value);

        $this->assertEquals($value, $term->toString());
    }
開發者ID:kafruhs,項目名稱:fws,代碼行數:19,代碼來源:IntTest.php

示例12: toString

 /**
  * generate sql string
  *
  * @return string
  * @throws base_database_Exception
  */
 public function toString()
 {
     $result = 'DELETE FROM ';
     $result .= $this->table->getName();
     if (empty($this->where)) {
         throw new base_database_Exception(TMS(base_database_Exception::NO_WHERE_GIVEN));
     }
     $result .= ' WHERE ';
     $result .= $this->where->toString();
     return $result;
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:17,代碼來源:Delete.php

示例13: exception_handler

function exception_handler(Exception $exception) {
    $div = Html::startTag('div', array('id' => 'exceptionBox'));
    $div .= Html::startTag('p', array('class' => 'h3')) . TMS(BaseException::HEADLINE) . Html::endTag('p');
    $div .= Html::startTag('hr');
    $div .= $exception->getMessage();
    $div .= Html::endTag('div');
    print($div);
    if ($exception instanceof BaseException) {
        $exception->debugOut();
    }
}
開發者ID:kafruhs,項目名稱:fws,代碼行數:11,代碼來源:config.php

示例14: __construct

    /**
     * @param string $dbName
     * @throws base_database_Exception
     */
    public function __construct($dbName = '')
    {
        if (empty($dbName)) {
            $dbName = Configuration::get()->getEntry('dbName');
        }

        if (empty($dbName)) {
            throw new base_database_Exception(TMS(base_database_Exception::DB_DBNAME_MISSED));
        }

        $this->dbName = $dbName;
    }
開發者ID:kafruhs,項目名稱:fws,代碼行數:16,代碼來源:CreateDB.php

示例15: mapFieldValue

 public function mapFieldValue($value)
 {
     $obj = Factory::createObject('vendor');
     $table = DB::table($obj->getTable());
     $where = DB::where($table->getColumn('name'), DB::term($value));
     $finder = Finder::create('vendor')->setWhere($where);
     $result = $finder->find(array($table->getColumn('LK')));
     if (count($result) > 1) {
         throw new base_exception_Mapper(TMS('medexchange.exception.mapper.vendorDuplicatedEntry'));
     }
     $lkArray = $result[0];
     return $lkArray['LK'];
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:13,代碼來源:FKVendor.php


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