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


PHP AddStr函数代码示例

本文整理汇总了PHP中AddStr函数的典型用法代码示例。如果您正苦于以下问题:PHP AddStr函数的具体用法?PHP AddStr怎么用?PHP AddStr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: SetHTTPContentTypeByPage

 /**
  * @param Page $page
  */
 protected function SetHTTPContentTypeByPage($page)
 {
     $headerString = 'Content-Type: text/html';
     if ($page->GetContentEncoding() != null) {
         AddStr($headerString, 'charset=' . $page->GetContentEncoding(), ';');
     }
     header($headerString);
 }
开发者ID:blakeHelm,项目名称:BallotPath,代码行数:11,代码来源:renderer.php

示例2: GetLink

 public function GetLink()
 {
     $parameterList = '';
     foreach ($this->parameters as $name => $value) {
         AddStr($parameterList, $name . '=' . urlencode($value), '&');
     }
     return $this->targetPage . ($parameterList != '' ? '?' : '') . $parameterList;
 }
开发者ID:howareyoucolin,项目名称:demo,代码行数:8,代码来源:common.php

示例3: BuildPrimaryKeyLink

function BuildPrimaryKeyLink($PrimaryKeyValues)
{
    $KeyValueList = '';
    $KeyValueNumber = 0;
    foreach ($PrimaryKeyValues as $PrimaryKeyValue) {
        AddStr($KeyValueList, "pk{$KeyValueNumber}={$PrimaryKeyValue}", '&');
        $KeyValueNumber++;
    }
    return $KeyValueList;
}
开发者ID:howareyoucolin,项目名称:demo,代码行数:10,代码来源:common_utils.php

示例4: extractValueFromArray

 /**
  * @{inheritdoc}
  */
 public function extractValueFromArray(ArrayWrapper $arrayWrapper, &$valueChanged)
 {
     $valueChanged = true;
     if ($arrayWrapper->isValueSet($this->GetName())) {
         $valuesArray = $arrayWrapper->GetValue($this->GetName());
         $result = '';
         foreach ($valuesArray as $value) {
             AddStr($result, $value, ',');
         }
         return $result;
     } else {
         return '';
     }
 }
开发者ID:martinw0102,项目名称:ProjetSyst,代码行数:17,代码来源:multi_choice_editor.php

示例5: ExceptionsToErrorMessage

 /**
  * @param SMException[] $exceptions
  * @return string
  */
 protected function ExceptionsToErrorMessage($exceptions)
 {
     $result = '';
     foreach ($exceptions as $exception) {
         if (is_subclass_of($exception, 'SMException')) {
             AddStr($result, $exception->getLocalizedMessage($this->GetPage()->GetLocalizerCaptions()), '<br><br>');
         } else {
             AddStr($result, $exception->getMessage(), '<br><br>');
         }
         if (defined('DEBUG_LEVEL') && DEBUG_LEVEL > 0) {
             $result .= '<br>Program trace: <br>' . FormatExceptionTrace($exception);
         }
     }
     return $result;
 }
开发者ID:howareyoucolin,项目名称:demo,代码行数:19,代码来源:grid_state.php

示例6: GetKeyFieldCondition

 private function GetKeyFieldCondition()
 {
     $result = '';
     foreach ($this->keyFieldValues as $fieldName => $value) {
         AddStr($result, $this->GetCommandImp()->GetFilterConditionGenerator()->CreateCondition(new FieldFilter($value, '='), $this->GetFieldByName($fieldName)), ' AND ');
     }
     return $result;
 }
开发者ID:blakeHelm,项目名称:BallotPath,代码行数:8,代码来源:delete_command.php

示例7: partition_GetPartitionConditionHandler

 function partition_GetPartitionConditionHandler($partitionName, &$condition)
 {
     $condition = '';
     if (isset($partitionName) && isset($this->partitions[$partitionName])) {
         foreach ($this->partitions[$partitionName] as $value) {
             AddStr($condition, sprintf('(project.dept_id = %s)', $this->PrepareTextForSQL($value)), ' OR ');
         }
     }
 }
开发者ID:CivicInfoBC,项目名称:workplan.gov_ver_1.19,代码行数:9,代码来源:project.php

示例8: GetFieldNames

 private function GetFieldNames()
 {
     $result = '';
     foreach ($this->fieldValues as $fieldName => $value) {
         if ($this->IsFieldValueSettedToDefault($fieldName) & !$this->GetCommandImp()->SupportsDefaultValue()) {
             continue;
         }
         AddStr($result, $this->GetCommandImp()->GetFieldFullName($this->GetFieldByName($fieldName)), ', ');
     }
     return $result;
 }
开发者ID:howareyoucolin,项目名称:demo,代码行数:11,代码来源:insert_command.php

示例9: QuoteTableIndetifier

 public function QuoteTableIndetifier($identifier)
 {
     if (StringUtils::Contains(StringUtils::Lower($identifier), 'select')) {
         return $identifier;
     }
     $result = '';
     $parts = StringUtils::SplitString('.', $identifier);
     foreach ($parts as $part) {
         AddStr($result, StringUtils::NormalizeQuotation($part, $this->GetFirstQuoteChar(), $this->GetLastQuoteChar()), '.');
     }
     return $result;
 }
开发者ID:howareyoucolin,项目名称:demo,代码行数:12,代码来源:commands.php

示例10: GenerateRss

 public function GenerateRss()
 {
     $result = '<?xml version="1.0" encoding="utf-8"?>';
     AddStr($result, '<rss version="2.0">');
     AddStr($result, '<channel>');
     AddStr($result, RssUtils::CreateTag('title', StringUtils::EscapeXmlString($this->GetTitle())));
     AddStr($result, RssUtils::CreateTag('link', StringUtils::EscapeXmlString($this->GetLink())));
     AddStr($result, RssUtils::CreateTag('description', $this->GetDescription()));
     foreach ($this->GetItems() as $item) {
         AddStr($result, $this->GenerateItemRss($item));
     }
     AddStr($result, '</channel>');
     AddStr($result, '</rss>');
     return $result;
 }
开发者ID:outsourcinggithub,项目名称:outsourcing,代码行数:15,代码来源:rss_feed_generator.php

示例11: Generate

 public final function Generate(Dataset $dataset, $filter)
 {
     if ($filter instanceof FilterCondition) {
         /** @var FilterCondition $filter  */
         return $this->GetFilterConditionAsSQL($dataset, $filter);
     } else {
         if ($filter instanceof FilterGroup) {
             $result = '';
             /** @var FilterGroup $filter  */
             for ($i = 0; $i < $filter->GetItemCount(); $i++) {
                 AddStr($result, $this->Generate($dataset, $filter->GetItem($i)), ' ' . $this->GetGroupOperatorAsSQL($filter->GetOperator()) . ' ');
             }
             return '(' . $result . ')';
         }
     }
     return null;
 }
开发者ID:blakeHelm,项目名称:BallotPath,代码行数:17,代码来源:filter_builder.php

示例12: GetValue

 public function GetValue()
 {
     $showButton = true;
     $this->OnShow->Fire(array(&$showButton));
     if ($showButton) {
         if ($this->useImages) {
             AddStr($result, '<span class="inline_edit_controls default-fade-in fade-out-on-hover" style="white-space: nowrap;">');
         } else {
             AddStr($result, '<span class="inline_edit_controls" style="white-space: nowrap;">');
         }
         if ($this->useImages) {
             AddStr($result, '<a href="#" class="inline_edit_init" title="' . $this->editButtonText . '">' . '<i class="pg-icon-edit-record"></i>' . '</a>');
             AddStr($result, '<a href="#" style="display: none;" class="inline_edit_cancel" title="' . $this->cancelButtonText . '">' . '<i class="pg-icon-inline-edit-cancel" title="' . $this->cancelButtonText . '"></i>' . '</a>');
             AddStr($result, '<a href="#" style="display: none;" class="inline_edit_commit" title="' . $this->commitButtonText . '">' . '<i class="pg-icon-inline-edit-commit" title="' . $this->commitButtonText . '"></i>' . '</a>');
         } else {
             AddStr($result, '<a href="#" class="inline_edit_init" title="' . $this->editButtonText . '">' . $this->editButtonText . '</a>');
             AddStr($result, '<a style="margin-right: 5px;" href="#" class="inline_edit_cancel" title="' . $this->cancelButtonText . '">' . $this->cancelButtonText . '</a>');
             AddStr($result, '<a href="#" class="inline_edit_commit" title="' . $this->commitButtonText . '">' . $this->commitButtonText . '</a>');
         }
         $keyValues = $this->dataset->GetPrimaryKeyValues();
         for ($i = 0; $i < count($keyValues); $i++) {
             AddStr($result, sprintf('<input type="hidden" name="pk%d" value="%s"></input>', $i, $keyValues[$i]));
         }
         AddStr($result, '</span>');
         return $result;
     } else {
         return '';
     }
 }
开发者ID:howareyoucolin,项目名称:demo,代码行数:29,代码来源:operation_columns.php

示例13: ExtractsValueFromPost

 /**
  * @param bool $valueChanged
  * @return string
  */
 public function ExtractsValueFromPost(&$valueChanged)
 {
     if (GetApplication()->IsPOSTValueSet($this->GetName())) {
         $valueChanged = true;
         $valuesArray = GetApplication()->GetPOSTValue($this->GetName());
         $result = '';
         foreach ($valuesArray as $value) {
             AddStr($result, $value, ',');
         }
         return $result;
     } else {
         $valueChanged = true;
         return '';
     }
 }
开发者ID:Kenovix,项目名称:san-miguel,代码行数:19,代码来源:editors.php

示例14: DoLastError

 public function DoLastError()
 {
     $result = '';
     $errors = sqlsrv_errors();
     if ($errors != null) {
         foreach ($errors as $error) {
             AddStr($result, $error['message'], '<br/>');
         }
     }
     return $result;
 }
开发者ID:martinw0102,项目名称:ProjetSyst,代码行数:11,代码来源:mssql_engine.php

示例15: ExecuteUpdateCommand

 public function ExecuteUpdateCommand($connection, $command)
 {
     $blobFieldTail = '';
     $blobFieldIndex = 0;
     $fieldValues = $command->GetValues();
     foreach ($command->GetFields() as $field) {
         if ($field->FieldType == ftBlob && isset($fieldValues[$field->Name])) {
             AddStr($blobFieldTail, sprintf('%s INTO :bind%s', $this->QuoteIdentifier($field->Name), $blobFieldIndex), ', ');
             $blobFieldIndex++;
         }
     }
     $resultSql = $command->GetSQL() . ($blobFieldTail != '' ? ' RETURNING ' . $blobFieldTail : '');
     $statement = @oci_parse($connection->GetConnectionHandle(), $resultSql);
     $blobFieldIndex = 0;
     $blobDescriptors = array();
     foreach ($command->GetFields() as $field) {
         if ($field->FieldType == ftBlob && isset($fieldValues[$field->Name])) {
             $blobDescriptors[$field->Name] = oci_new_descriptor($connection->GetConnectionHandle(), OCI_D_LOB);
             @oci_bind_by_name($statement, ':bind' . $blobFieldIndex, $blobDescriptors[$field->Name], -1, OCI_B_BLOB);
             $blobFieldIndex++;
         }
     }
     $result = @oci_execute($statement, OCI_COMMIT_ON_SUCCESS);
     foreach ($command->GetFields() as $field) {
         if ($field->FieldType == ftBlob && isset($fieldValues[$field->Name])) {
             if (is_array($fieldValues[$field->Name])) {
                 $blobDescriptors[$field->Name]->save(file_get_contents($fieldValues[$field->Name][0]));
             } else {
                 $blobDescriptors[$field->Name]->save($fieldValues[$field->Name]);
             }
             $blobDescriptors[$field->Name]->free();
         }
     }
     $error = oci_error($statement);
     return $result;
 }
开发者ID:kcallow,项目名称:MatchMe,代码行数:36,代码来源:oracle_engine.php


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