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


PHP ArrayUtil::trimStringsInArray方法代码示例

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


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

示例1: adminSave

 public function adminSave($aChosenOptions)
 {
     ArrayUtil::trimStringsInArray($aChosenOptions);
     $sValue = $aChosenOptions['external'];
     if (!$aChosenOptions['external']) {
         $sValue = $aChosenOptions['internal'];
         //TODO: remove outdated references (and when changing page types)
         ReferencePeer::addReference($this->oPage, PageQuery::create()->findPk($sValue));
     }
     $this->oPage->updatePageProperty('redirect-location', $sValue);
 }
开发者ID:rapila,项目名称:plugin-redirect,代码行数:11,代码来源:RedirectPageTypeModule.php

示例2: __construct

 public function __construct()
 {
     parent::__construct(false);
     $this->sAction = 'login';
     if (Manager::isPost()) {
         ArrayUtil::trimStringsInArray($_POST);
     }
     //1st step: user clicked on the recovery link
     //	• Display email field
     if (isset($_REQUEST['password_forgotten'])) {
         $this->sAction = 'password_forgotten';
     }
     //2nd step: user has entered an email address
     //	• Send the email with the recovery link (and generate the hint)
     //	• Add confirmation message to flash
     if (isset($_POST['password_reset_user_name'])) {
         $this->sAction = self::processPasswordReset();
     }
     //3rd step: user has clicked on the reset link in the e-mail
     //	• Validate the hint
     //	• Display a form for entering a new password (form also contains hidden fields for email and hint)
     //	• Add the referrer to the session (again)
     if (isset($_REQUEST['recover_username'])) {
         $this->sAction = self::passwordReset();
     }
     //4th step: user has submitted the new password
     //	• Validate the hint (again)
     //	• Validate password constraints
     //	• Set the new password (if valid)
     //	• Log in (if valid)
     //	• Redirect to the referrer (if valid)
     if (isset($_POST['new_password'])) {
         $this->sAction = self::loginNewPassword();
     }
     if (isset($_POST[self::USER_NAME])) {
         self::login();
     }
     $oOutput = new XHTMLOutput('transitional');
     $oOutput->render();
     $this->oTemplate = new Template('login', array(DIRNAME_TEMPLATES, 'login'), false, true);
 }
开发者ID:rapila,项目名称:cms-base,代码行数:41,代码来源:LoginManager.php

示例3: display

 public function display(Template $oTemplate, $bIsPreview = false)
 {
     if (Manager::isPost()) {
         ArrayUtil::trimStringsInArray($_POST);
     }
     //1st step: user clicked on the recovery link
     //	• Display email field
     if (isset($_REQUEST['password_forgotten'])) {
         $this->sAction = 'password_forgotten';
     }
     //2nd step: user has entered an email address
     //	• Send the email with the recovery link (and generate the hint)
     //	• Add confirmation message to flash
     if (isset($_POST['password_reset_user_name'])) {
         $this->sAction = LoginManager::processPasswordReset(LinkUtil::link($this->oPage->getFullPathArray(), 'FrontendManager'));
     }
     //3rd step: user has clicked on the reset link in the e-mail
     //	• Validate the hint
     //	• Display a form for entering a new password (form also contains hidden fields for email and hint)
     //	• Add the referrer to the session (again)
     if (isset($_REQUEST['recover_username'])) {
         $this->sAction = LoginManager::passwordReset();
     }
     //4th step: user has submitted the new password
     //	• Validate the hint (again)
     //	• Validate password constraints
     //	• Set the new password (if valid)
     //	• Log in (if valid)
     //	• Redirect to the referrer (if valid)
     if (isset($_POST['new_password'])) {
         $this->sAction = LoginManager::loginNewPassword(LinkUtil::link($this->oPage->getFullPathArray()));
     }
     if (isset($_POST[LoginManager::USER_NAME])) {
         LoginManager::login(null, null, LinkUtil::link($this->oPage->getFullPathArray()));
     }
     parent::display($oTemplate, $bIsPreview);
 }
开发者ID:rapila,项目名称:cms-base,代码行数:37,代码来源:LoginPageTypeModule.php


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