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


PHP Debug::Singleton方法代码示例

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


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

示例1: createCategory

 /**
 	 @param string $p_name	The name of the category
 	 @return boolean	Success
 */
 public function createCategory($p_name)
 {
     try {
         $this->r_cloudBankServer->beginTransaction();
         $this->createOrUpdateLedgerAccount($p_name, CloudBankConsts::LedgerAccountType_Category);
         $this->r_cloudBankServer->commitTransaction();
     } catch (Exception $v_exception) {
         Debug::Singleton()->log(var_export($v_exception, true));
         throw $v_exception;
     }
     return true;
 }
开发者ID:psagi,项目名称:cloudbank,代码行数:16,代码来源:LedgerAccountService.php

示例2: ParseCSVLine

 public static function ParseCSVLine($p_line)
 {
     Debug::Singleton()->log("Util::ParseCSVLine({$p_line})");
     $v_line = preg_replace('/,/', ',_', $p_line);
     /* ugly workaround to make the first character of the fields
        non-vulnerable */
     Debug::Singleton()->log("Util::ParseCSVLine(): \$v_line = {$v_line}");
     $v_csv_record_arr = str_getcsv($v_line);
     foreach ($v_csv_record_arr as &$v_field) {
         $v_field = preg_replace('/^_/', '', $v_field);
     }
     return $v_csv_record_arr;
 }
开发者ID:psagi,项目名称:cloudbank,代码行数:13,代码来源:Util.php

示例3: execQuery

 public function execQuery($p_sQL, $p_bindArray = NULL)
 {
     $v_statement = $this->r_dBConnection->prepare($p_sQL);
     Debug::Singleton()->log('CloudBankServer::execQuery(): $v_statement = ' . var_export($v_statement, true));
     Debug::Singleton()->log('CloudBankServer::execQuery(): $p_bindArray = ' . var_export($p_bindArray, true));
     self::BindValues($v_statement, $p_bindArray);
     Debug::Singleton()->log('CloudBankServer::execQuery(): $v_statement = ' . var_export($v_statement, true));
     $v_isSuccess = $v_statement->execute();
     Debug::Singleton()->log('CloudBankServer::execQuery(): $v_isSuccess = ' . ($v_isSuccess ? 'true' : 'false'));
     $v_resultSet = $v_statement->fetchAll();
     Debug::Singleton()->log('CloudBankServer::execQuery(): $v_resultSet = ' . var_export($v_resultSet, true));
     return $v_resultSet;
 }
开发者ID:psagi,项目名称:cloudbank,代码行数:13,代码来源:CloudBankServer.php

示例4: importStatement

 /**
 	 @param Statement $p_statement http://pety.dynu.net/CloudBank/StatementService
 	 @return boolean	Success
 */
 public function importStatement($p_statement)
 {
     Debug::Singleton()->log('importStatement(' . var_export($p_statement, true) . ')');
     $this->assertTableIsEmpty();
     $this->r_cloudBankServer->beginTransaction();
     $v_line_no = 0;
     foreach ($p_statement->StatementLine as $v_statement_line) {
         ++$v_line_no;
         Debug::Singleton()->log("importStatement: {$v_line_no}: {$v_statement_line}");
         $v_statement_item_arr = Util::ParseCSVLine($v_statement_line);
         Debug::Singleton()->log("importStatement: {$v_line_no}: " . var_export($v_statement_item_arr, true));
         if (count($v_statement_item_arr) == 0) {
             continue;
         }
         $this->assertStatementItemIsValid($v_statement_item_arr, $v_line_no, $v_statement_line);
         $this->createStatementItem($v_statement_item_arr);
     }
     $this->r_cloudBankServer->commitTransaction();
     return true;
 }
开发者ID:psagi,项目名称:cloudbank,代码行数:24,代码来源:StatementService.php

示例5: CheckStrLength

 private static function CheckStrLength($p_str, $p_minLen, $p_maxLen)
 {
     Debug::Singleton()->log("SchemaDef::CheckStrLength({$p_str}, {$p_minLen}, {$p_maxLen})");
     $v_length = mb_strlen($p_str, 'UTF-8');
     Debug::Singleton()->log("SchemaDef::CheckStrLength(): \$v_length = {$v_length}");
     Debug::Singleton()->log("SchemaDef::CheckStrLength(): mb_internal_encoding() = " . mb_internal_encoding());
     return $v_length >= $p_minLen && $v_length <= $p_maxLen;
 }
开发者ID:psagi,项目名称:cloudbank,代码行数:8,代码来源:SchemaDef.php

示例6: assertSameAsCurrent

    private function assertSameAsCurrent($p_accountID, $p_oldEvent)
    {
        Debug::Singleton()->log('assertSameAsCurrent(' . var_export($p_accountID, true) . ', ' . var_export($p_oldEvent, true) . ')');
        $v_currentEvent = $this->r_cloudBankServer->execQuery('
		  SELECT
		     date, description, other_ledger_account_id, amount,
		     statement_item_id, is_cleared
		  FROM account_events
		  WHERE ledger_account_id = :account_id AND id = :id
	       ', array(':account_id' => $p_accountID, ':id' => $p_oldEvent['id']));
        $v_mapping = array('date' => 'date', 'description' => 'description', 'other_account_id' => 'other_ledger_account_id', 'amount' => 'amount', 'is_cleared' => 'is_cleared');
        if (isset($p_oldEvent['statement_item_id'])) {
            $v_mapping['is_cleared'] = 'is_cleared';
        }
        if (!CloudBankServer::IsEqual($p_oldEvent, $v_currentEvent[0], $v_mapping)) {
            throw new Exception("The event to be modified ({$p_oldEvent['id']}) does not " . "exist or has been modified by another session. Please try " . "again.");
        }
    }
开发者ID:psagi,项目名称:cloudbank,代码行数:18,代码来源:EventService.php


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