當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。