本文整理汇总了PHP中api_AContainer类的典型用法代码示例。如果您正苦于以下问题:PHP api_AContainer类的具体用法?PHP api_AContainer怎么用?PHP api_AContainer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了api_AContainer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: DbInsertArrays
/**
* @param object $oObject
* @param object $oHelper
* @return array
*/
public static function DbInsertArrays($oObject, $oHelper)
{
$aResult = array(false, false);
$sQueryParams = '';
$bUseLogQueryParams = (bool) CApi::GetConf('labs.db.log-query-params', false);
$oObject->initBeforeChange();
$aStaticMap = $oObject->getMap();
$aMap = api_AContainer::DbWriteKeys($aStaticMap, true);
$aDbKeys = array_keys($aMap);
$aResult[0] = array_map(array(&$oHelper, 'EscapeColumn'), $aDbKeys);
$aDbValues = array_values($aMap);
foreach ($aDbValues as $iIndex => $sKey) {
$mValue = $oObject->{$sKey};
if (isset($aStaticMap[$sKey][0])) {
if ('password' === $aStaticMap[$sKey][0]) {
$mValue = api_Utils::EncodePassword($mValue);
} else {
if ('datetime' === $aStaticMap[$sKey][0]) {
$mValue = $oHelper->TimeStampToDateFormat($mValue);
} else {
if ('serialize' === $aStaticMap[$sKey][0]) {
$mValue = '' === $mValue ? '' : serialize($mValue);
}
}
}
}
$aDbValues[$iIndex] = is_string($mValue) ? $oHelper->EscapeString($mValue) : (int) $mValue;
if ($bUseLogQueryParams) {
$sDbKey = isset($aDbKeys[$iIndex]) ? $aDbKeys[$iIndex] : '!unknown!';
$sQueryParams .= API_CRLF . API_TAB . $sDbKey . ' = ' . $aDbValues[$iIndex];
}
}
$aResult[1] = $aDbValues;
if ($bUseLogQueryParams) {
CApi::Log($sQueryParams);
}
return $aResult;
}
开发者ID:Git-Host,项目名称:email,代码行数:43,代码来源:container.php
示例2: _getUserByWhereQuery
/**
* Returns query-string for obtaining user by specified condition.
*
* @param string $sWhere Specified condition.
*
* @return string
*/
protected function _getUserByWhereQuery($sWhere)
{
$aMap = api_AContainer::DbReadKeys(CUser::getStaticMap());
$aMap = array_map(array($this, 'escapeColumn'), $aMap);
$sSql = 'SELECT %s FROM %sawm_settings WHERE %s';
return sprintf($sSql, implode(', ', $aMap), $this->prefix(), $sWhere);
}
开发者ID:Git-Host,项目名称:email,代码行数:14,代码来源:command_creator.php
示例3: getAccountByWhere
/**
* @param string $sWhere
* @return string
*/
protected function getAccountByWhere($sWhere)
{
$aMap = api_AContainer::DbReadKeys(CTwofactorauth::getStaticMap());
$aMap = array_map(array($this, 'escapeColumn'), $aMap);
$sSql = 'SELECT %s FROM %stwofa_accounts WHERE %s';
return sprintf($sSql, implode(', ', $aMap), $this->prefix(), $sWhere);
}
开发者ID:pkdevboxy,项目名称:webmail-lite,代码行数:11,代码来源:command_creator.php
示例4: getSocialByWhere
/**
* @param string $sWhere
* @return string
*/
protected function getSocialByWhere($sWhere)
{
$aMap = api_AContainer::DbReadKeys(CSocial::GetStaticMap());
$aMap = array_map(array($this, 'escapeColumn'), $aMap);
$sSql = 'SELECT %s FROM %sawm_social WHERE %s';
return sprintf($sSql, implode(', ', $aMap), $this->Prefix(), $sWhere);
}
开发者ID:BertLasker,项目名称:Catch-design,代码行数:11,代码来源:command_creator.php
示例5: updateSubscription
/**
* @param CSubscription $oSubscription
*
* @return string
*/
public function updateSubscription($oSubscription)
{
$aResult = api_AContainer::DbUpdateArray($oSubscription, $this->oHelper);
$sSql = 'UPDATE %sawm_fetchers SET %s WHERE %s = %d AND %s = %d';
return sprintf($sSql, $this->prefix(), implode(', ', $aResult), $this->escapeColumn('id_tenant'), $oSubscription->IdTenant, $this->escapeColumn('id_subscription'), $oSubscription->IdSubscription);
}
开发者ID:Git-Host,项目名称:email,代码行数:11,代码来源:command_creator.php
示例6: UpdateTenant
/**
* @param CTenant $oTenant
*
* @return string
*/
function UpdateTenant(CTenant $oTenant)
{
$aResult = api_AContainer::DbUpdateArray($oTenant, $this->oHelper);
$sSql = 'UPDATE %sawm_tenants SET %s WHERE id_tenant = %d';
return sprintf($sSql, $this->Prefix(), implode(', ', $aResult), $oTenant->IdTenant);
}
开发者ID:hallnewman,项目名称:webmail-lite,代码行数:11,代码来源:command_creator.php
示例7: updateSocial
/**
* @param CTenantSocials $oSocial
*
* @return bool
*/
public function updateSocial(CTenantSocials $oSocial)
{
$aResult = api_AContainer::DbUpdateArray($oSocial, $this->oHelper);
$sSql = 'UPDATE %sawm_tenant_socials SET %s WHERE id = %d';
return sprintf($sSql, $this->prefix(), implode(', ', $aResult), $oSocial->Id);
}
开发者ID:pkdevboxy,项目名称:webmail-lite,代码行数:11,代码来源:command_creator.php
示例8: UpdateGroup
/**
* @param CGroup $oGroup
* @return string
*/
public function UpdateGroup($oGroup)
{
$sSql = 'UPDATE %sawm_addr_groups SET %s WHERE id_user = %d AND id_group = %d';
return sprintf($sSql, $this->prefix(), implode(', ', api_AContainer::DbUpdateArray($oGroup, $this->oHelper)), $oGroup->IdUser, $oGroup->IdGroup);
}
开发者ID:pkdevboxy,项目名称:webmail-lite,代码行数:9,代码来源:command_creator.php
示例9: CreatePost
/**
* @param CHelpdeskUser $oHelpdeskUser
* @param CHelpdeskPost $oHelpdeskPost
* @return string
*/
public function CreatePost(CHelpdeskUser $oHelpdeskUser, CHelpdeskPost $oHelpdeskPost)
{
$aResults = api_AContainer::DbInsertArrays($oHelpdeskPost, $this->oHelper);
if (!empty($aResults[0]) && !empty($aResults[1])) {
$sSql = 'INSERT INTO %sahd_posts ( %s ) VALUES ( %s )';
return sprintf($sSql, $this->Prefix(), implode(', ', $aResults[0]), implode(', ', $aResults[1]));
}
return '';
}
开发者ID:hallnewman,项目名称:webmail-lite,代码行数:14,代码来源:command_creator.php
示例10: updateFetcher
/**
* @param CAccount $oAccount
* @param CFetcher $oFetcher
* @return string
*/
public function updateFetcher($oAccount, $oFetcher)
{
$aResult = api_AContainer::DbUpdateArray($oFetcher, $this->oHelper);
$sSql = 'UPDATE %sawm_fetchers SET %s WHERE %s = %d AND %s = %d';
return sprintf($sSql, $this->prefix(), implode(', ', $aResult), $this->escapeColumn('id_acct'), $oAccount->IdAccount, $this->escapeColumn('id_fetcher'), $oFetcher->IdFetcher);
}
开发者ID:Git-Host,项目名称:email,代码行数:11,代码来源:command_creator.php
示例11: __construct
/**
* @param CAccount $oAccount
*/
public function __construct(CAccount $oAccount)
{
parent::__construct(get_class($this));
$this->SetTrimer(array('Name', 'Signature', 'IncomingMailServer', 'IncomingMailLogin', 'IncomingMailPassword', 'OutgoingMailServer'));
$this->SetLower(array('IncomingMailServer', 'OutgoingMailServer'));
$this->SetDefaults(array('IdFetcher' => 0, 'IdAccount' => $oAccount->IdAccount, 'IdUser' => $oAccount->IdUser, 'IdDomain' => $oAccount->IdDomain, 'IdTenant' => $oAccount->IdTenant, 'IsEnabled' => true, 'IsLocked' => false, 'CheckInterval' => 0, 'CheckLastTime' => 0, 'Name' => '', 'Email' => '', 'Signature' => '', 'SignatureOptions' => EAccountSignatureOptions::DontAdd, 'LeaveMessagesOnServer' => true, 'IncomingMailServer' => '', 'IncomingMailPort' => 110, 'IncomingMailLogin' => '', 'IncomingMailPassword' => '', 'IncomingMailSecurity' => \MailSo\Net\Enumerations\ConnectionSecurityType::NONE, 'IsOutgoingEnabled' => false, 'OutgoingMailServer' => '', 'OutgoingMailPort' => 25, 'OutgoingMailAuth' => true, 'OutgoingMailSecurity' => \MailSo\Net\Enumerations\ConnectionSecurityType::NONE, 'Folder' => 'INBOX'));
}
开发者ID:BertLasker,项目名称:Catch-design,代码行数:10,代码来源:fetcher.php
示例12: __construct
/**
* @param CDomain $oDomain
* @return void
*/
public function __construct()
{
parent::__construct(get_class($this), 'IdIdentity');
$this->SetTrimer(array('Email', 'FriendlyName'));
$this->SetDefaults(array('IdIdentity' => 0, 'IdUser' => 0, 'IdAccount' => 0, 'Virtual' => false, 'Default' => false, 'Enabled' => true, 'Email' => '', 'FriendlyName' => '', 'Signature' => '', 'SignatureType' => EAccountSignatureType::Html, 'UseSignature' => false));
CApi::Plugin()->RunHook('api-identity-construct', array(&$this));
}
开发者ID:BertLasker,项目名称:Catch-design,代码行数:11,代码来源:identity.php
示例13: __construct
public function __construct()
{
parent::__construct(get_class($this));
$this->SetTrimer(array('Subject'));
$this->Owner = null;
$this->SetDefaults(array('IdHelpdeskThread' => 0, 'StrHelpdeskThreadHash' => trim(base_convert(md5(microtime(true) . rand(1000, 9999)), 16, 32), '0'), 'IdTenant' => 0, 'IdOwner' => 0, 'ItsMe' => false, 'IsArchived' => false, 'Type' => EHelpdeskThreadType::None, 'Subject' => '', 'Created' => time(), 'Updated' => time(), 'PostCount' => 0, 'LastPostId' => 0, 'LastPostOwnerId' => 0, 'Notificated' => false, 'HasAttachments' => false, 'IsRead' => false));
}
开发者ID:hallnewman,项目名称:webmail-lite,代码行数:7,代码来源:thread.php
示例14: __construct
public function __construct()
{
parent::__construct(get_class($this));
$this->SetTrimer(array('Name', 'Email', 'PasswordHash'));
$this->SetLower(array('Email'));
$oSettings =& CApi::GetSettings();
$this->SetDefaults(array(
'IdHelpdeskUser' => 0,
'IdSystemUser' => 0,
'IdTenant' => 0,
'Activated' => false,
'Blocked' => false,
'IsAgent' => false,
// 'IsSocial' => false,
'Name' => '',
'Email' => '',
'NotificationEmail' => '',
'SocialId' => '',
'SocialType' => '',
'ActivateHash' => md5(microtime(true).rand(1000, 9999)),
'Language' => $oSettings->GetConf('Common/DefaultLanguage'),
'DateFormat' => $oSettings->GetConf('Common/DefaultDateFormat'),
'TimeFormat' => $oSettings->GetConf('Common/DefaultTimeFormat'),
'NotificationPassword' => '',
'PasswordHash' => '',
'PasswordSalt' => md5(microtime(true).rand(10000, 99999)),
'MailNotifications' => false,
'Created' => time()
));
}
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:35,代码来源:user.php
示例15: __construct
public function __construct()
{
parent::__construct(get_class($this));
$this->SetDefaults(array(
'Id' => '',
'Type' => EFileStorageType::Personal,
'Path' => '',
'Name' => '',
'Size' => 0,
'IsFolder' => false,
'IsLink' => false,
'LinkType' => EFileStorageLinkType::Unknown,
'LinkUrl' => '',
'LastModified' => 0,
'ContentType' => '',
'Thumb' => false,
'ThumbnailLink' => '',
'Hash' => '',
'Shared' => false,
'Owner' => '',
'Content' => '',
'IsExternal' => false
));
}
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:25,代码来源:item.php
示例16: __construct
public function __construct()
{
parent::__construct(get_class($this));
$this->SetTrimer(array('Text'));
$this->Owner = null;
$this->Attachments = null;
$this->SetDefaults(array('IdHelpdeskPost' => 0, 'IdHelpdeskThread' => 0, 'IdTenant' => 0, 'IdOwner' => 0, 'Type' => EHelpdeskPostType::Normal, 'SystemType' => EHelpdeskPostSystemType::None, 'Created' => time(), 'IsThreadOwner' => true, 'ItsMe' => false, 'Text' => ''));
}
开发者ID:BertLasker,项目名称:Catch-design,代码行数:8,代码来源:post.php
示例17: InitBeforeChange
/**
* @return bool
*/
public function InitBeforeChange()
{
parent::InitBeforeChange();
if (0 === strlen($this->IdGroupStr)) {
$this->IdGroupStr = $this->GenerateStrId();
}
return true;
}
开发者ID:BertLasker,项目名称:Catch-design,代码行数:11,代码来源:group.php
示例18: __construct
public function __construct($sLogin = '', $Description = '')
{
parent::__construct(get_class($this), 'IdTenant');
$this->__USE_TRIM_IN_STRINGS__ = true;
$oSettings =& CApi::GetSettings();
$this->SetDefaults(array('IdTenant' => 0, 'IdChannel' => 0, 'IsDisabled' => false, 'IsDefault' => false, 'Login' => $sLogin, 'Email' => '', 'PasswordHash' => '', 'Description' => $Description, 'IsEnableAdminPanelLogin' => false, 'QuotaInMB' => 0, 'AllocatedSpaceInMB' => 0, 'FilesUsageInBytes' => '0', 'FilesUsageInMB' => 0, 'FilesUsageDynamicQuotaInMB' => 0, 'UserCountLimit' => 0, 'DomainCountLimit' => 0, 'Capa' => (string) $oSettings->GetConf('Common/TenantGlobalCapa'), 'AllowChangeAdminEmail' => true, 'AllowChangeAdminPassword' => true, 'Expared' => 0, 'PayUrl' => '', 'IsTrial' => false, 'HelpdeskAdminEmailAccount' => '', 'HelpdeskClientIframeUrl' => '', 'HelpdeskAgentIframeUrl' => '', 'HelpdeskSiteName' => '', 'HelpdeskStyleAllow' => false, 'HelpdeskStyleImage' => '', 'HelpdeskStyleText' => '', 'LoginStyleImage' => '', 'AppStyleImage' => '', 'HelpdeskFacebookAllow' => !!$oSettings->GetConf('Helpdesk/FacebookAllow'), 'HelpdeskFacebookId' => (string) $oSettings->GetConf('Helpdesk/FacebookId'), 'HelpdeskFacebookSecret' => (string) $oSettings->GetConf('Helpdesk/FacebookSecret'), 'HelpdeskGoogleAllow' => !!$oSettings->GetConf('Helpdesk/GoogleAllow'), 'HelpdeskGoogleId' => (string) $oSettings->GetConf('Helpdesk/GoogleId'), 'HelpdeskGoogleSecret' => (string) $oSettings->GetConf('Helpdesk/GoogleSecret'), 'HelpdeskTwitterAllow' => !!$oSettings->GetConf('Helpdesk/TwitterAllow'), 'HelpdeskTwitterId' => (string) $oSettings->GetConf('Helpdesk/TwitterId'), 'HelpdeskTwitterSecret' => (string) $oSettings->GetConf('Helpdesk/TwitterSecret'), 'HelpdeskFetcherType' => EHelpdeskFetcherType::NONE, 'HelpdeskAllowFetcher' => false, 'HelpdeskFetcherTimer' => 0, 'SipAllow' => !!$oSettings->GetConf('Sip/AllowSip'), 'SipAllowConfiguration' => false, 'SipRealm' => (string) $oSettings->GetConf('Sip/Realm'), 'SipWebsocketProxyUrl' => (string) $oSettings->GetConf('Sip/WebsocketProxyUrl'), 'SipOutboundProxyUrl' => (string) $oSettings->GetConf('Sip/OutboundProxyUrl'), 'SipCallerID' => (string) $oSettings->GetConf('Sip/CallerID'), 'TwilioAllow' => !!$oSettings->GetConf('Twilio/AllowTwilio'), 'TwilioAllowConfiguration' => false, 'TwilioPhoneNumber' => (string) $oSettings->GetConf('Twilio/PhoneNumber'), 'TwilioAccountSID' => (string) $oSettings->GetConf('Twilio/AccountSID'), 'TwilioAuthToken' => (string) $oSettings->GetConf('Twilio/AuthToken'), 'TwilioAppSID' => (string) $oSettings->GetConf('Twilio/AppSID'), 'Socials' => $this->getDefaultSocials(), 'CalendarNotificationEmailAccount' => '', 'InviteNotificationEmailAccount' => ''));
$this->SetLower(array('Login', 'Email', 'HelpdeskAdminEmailAccount', 'CalendarNotificationEmailAccount', 'InviteNotificationEmailAccount'));
$this->SetUpper(array('Capa'));
}
开发者ID:nsine,项目名称:webmail-lite,代码行数:9,代码来源:tenant.php
示例19: __construct
/**
* @return void
*/
public function __construct(CDomain $oDomain)
{
parent::__construct(get_class($this), 'IdUser');
$oSettings =& CApi::GetSettings();
$iSaveMail = $oSettings->GetConf('WebMail/SaveMail');
$iSaveMail = ESaveMail::Always !== $iSaveMail ? $oSettings->GetConf('WebMail/SaveMail') : ESaveMail::DefaultOn;
$this->oSubCache = null;
$this->__USE_TRIM_IN_STRINGS__ = true;
$this->SetUpper(array('Capa'));
$this->SetDefaults(array('IdUser' => 0, 'IdSubscription' => 0, 'IdHelpdeskUser' => 0, 'MailsPerPage' => $oDomain->MailsPerPage, 'ContactsPerPage' => $oDomain->ContactsPerPage, 'AutoCheckMailInterval' => $oDomain->AutoCheckMailInterval, 'CreatedTime' => 0, 'LastLogin' => 0, 'LastLoginNow' => 0, 'LoginsCount' => 0, 'DefaultSkin' => $oDomain->DefaultSkin, 'DefaultLanguage' => $oDomain->DefaultLanguage, 'DefaultEditor' => EUserHtmlEditor::Html, 'SaveMail' => $iSaveMail, 'Layout' => $oDomain->Layout, 'DefaultTimeZone' => 0, 'DefaultTimeFormat' => $oDomain->DefaultTimeFormat, 'DefaultDateFormat' => $oDomain->DefaultDateFormat, 'DefaultIncomingCharset' => CApi::GetConf('webmail.default-inc-charset', 'iso-8859-1'), 'Question1' => '', 'Question2' => '', 'Answer1' => '', 'Answer2' => '', 'TwilioNumber' => '', 'TwilioEnable' => true, 'TwilioDefaultNumber' => false, 'SipEnable' => true, 'SipImpi' => '', 'SipPassword' => '', 'Capa' => '', 'ClientTimeZone' => '', 'UseThreads' => $oDomain->UseThreads, 'SaveRepliedMessagesToCurrentFolder' => false, 'DesktopNotifications' => false, 'AllowChangeInputDirection' => false, 'EnableOpenPgp' => false, 'AllowAutosaveInDrafts' => true, 'AutosignOutgoingEmails' => false, 'AllowHelpdeskNotifications' => false, 'CustomFields' => '', 'FilesEnable' => true));
CApi::Plugin()->RunHook('api-user-construct', array(&$this));
}
开发者ID:BertLasker,项目名称:Catch-design,代码行数:15,代码来源:user.php
示例20: __construct
/**
* @param CAccount $oAccount
*/
public function __construct(CAccount $oAccount)
{
parent::__construct(get_class($this));
$this->SetDefaults(array(
'IdAccount' => $oAccount->IdAccount,
'Enable' => true,
'Field' => EFilterFiels::From,
'Filter' => '',
'Condition' => EFilterCondition::ContainSubstring,
'Action' => EFilterAction::DoNothing,
'FolderFullName' => ''
));
}
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:17,代码来源:filter.php
注:本文中的api_AContainer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论