当前位置: 首页>>代码示例>>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;未经允许,请勿转载。