本文整理汇总了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);
}
示例2: GetLink
public function GetLink()
{
$parameterList = '';
foreach ($this->parameters as $name => $value) {
AddStr($parameterList, $name . '=' . urlencode($value), '&');
}
return $this->targetPage . ($parameterList != '' ? '?' : '') . $parameterList;
}
示例3: BuildPrimaryKeyLink
function BuildPrimaryKeyLink($PrimaryKeyValues)
{
$KeyValueList = '';
$KeyValueNumber = 0;
foreach ($PrimaryKeyValues as $PrimaryKeyValue) {
AddStr($KeyValueList, "pk{$KeyValueNumber}={$PrimaryKeyValue}", '&');
$KeyValueNumber++;
}
return $KeyValueList;
}
示例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 '';
}
}
示例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;
}
示例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;
}
示例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 ');
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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 '';
}
}
示例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 '';
}
}
示例14: DoLastError
public function DoLastError()
{
$result = '';
$errors = sqlsrv_errors();
if ($errors != null) {
foreach ($errors as $error) {
AddStr($result, $error['message'], '<br/>');
}
}
return $result;
}
示例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;
}