當前位置: 首頁>>代碼示例>>PHP>>正文


PHP icms_core_Debug::vardump方法代碼示例

本文整理匯總了PHP中icms_core_Debug::vardump方法的典型用法代碼示例。如果您正苦於以下問題:PHP icms_core_Debug::vardump方法的具體用法?PHP icms_core_Debug::vardump怎麽用?PHP icms_core_Debug::vardump使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在icms_core_Debug的用法示例。


在下文中一共展示了icms_core_Debug::vardump方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: icms_debug_vardump

/**
 * Output a dump of a variable
 *
 * @param string $var variable which will be dumped
 * @deprecated	Use icms_core_Debug::vardump() instead
 */
function icms_debug_vardump($var)
{
    icms_core_Debug::setDeprecated('icms_core_Debug::vardump');
    return icms_core_Debug::vardump($var);
}
開發者ID:LeeGlendenning,項目名稱:formulize,代碼行數:11,代碼來源:debug_functions.php

示例2: authenticate

 /**
  * Authenticate using the OpenID protocol
  *
  * @param bool $debug Turn debug on or not
  * @return bool successful?
  */
 public function authenticate($debug = FALSE)
 {
     // check to see if we already have an OpenID response in SESSION
     if (isset($_SESSION['openid_response'])) {
         if ($debug) {
             icms_core_Debug::message(_CORE_OID_INSESSIONS);
         }
         $this->response = unserialize($_SESSION['openid_response']);
     } else {
         if ($debug) {
             icms_core_Debug::message(_CORE_OID_FETCHING);
         }
         // Complete the authentication process using the server's response.
         $consumer = getConsumer();
         $return_to = getReturnTo();
         //$this->response = $consumer->complete($_GET);
         $this->response = $consumer->complete($return_to);
         $_SESSION['openid_response'] = serialize($this->response);
     }
     if ($this->response->status == Auth_OpenID_CANCEL) {
         if ($debug) {
             icms_core_Debug::message(_CORE_OID_STATCANCEL);
         }
         // This means the authentication was cancelled.
         $this->setErrors('100', _CORE_OID_VERIFCANCEL);
     } elseif ($this->response->status == Auth_OpenID_FAILURE) {
         if ($debug) {
             icms_core_Debug::message(_CORE_OID_SERVERFAILED);
         }
         $this->setErrors('101', _CORE_OID_FAILED . $this->response->message);
         if ($debug) {
             icms_core_Debug::message(_CORE_OID_DUMPREQ);
             icms_core_Debug::vardump($_REQUEST);
         }
         return FALSE;
     } elseif ($this->response->status == Auth_OpenID_SUCCESS) {
         // This means the authentication succeeded.
         $this->displayid = $this->response->getDisplayIdentifier();
         $this->openid = $this->response->identity_url;
         $sreg_resp = Auth_OpenID_SRegResponse::fromSuccessResponse($this->response);
         $sreg = $sreg_resp->contents();
         $_SESSION['openid_sreg'] = $sreg;
         if ($debug) {
             icms_core_Debug::message(_CORE_OID_SERVERSUCCESS);
             icms_core_Debug::message(_CORE_OID_DISPID . $this->displayid);
             icms_core_Debug::message(_CORE_OID_OPENID . $this->openid);
             icms_core_Debug::message(_CORE_OID_DUMPING);
             icms_core_Debug::vardump($sreg);
         }
         $esc_identity = htmlspecialchars($this->openid, ENT_QUOTES);
         $success = sprintf(_CORE_OID_SUCESSFULLYIDENTIFIED, $esc_identity, $this->displayid);
         if ($this->response->endpoint->canonicalID) {
             $success .= sprintf(_CORE_OID_CANONID, $this->response->endpoint->canonicalID);
         }
         /**
          * Now, where are we in the process, just back from OpenID server or trying to register or
          * trying to link to an existing account
          */
         if (isset($_POST['openid_register'])) {
             if ($debug) {
                 icms_core_Debug::message(_CORE_OID_STEPIS . 'OPENID_STEP_REGISTER');
             }
             $this->step = OPENID_STEP_REGISTER;
         } elseif (isset($_POST['openid_link'])) {
             if ($debug) {
                 icms_core_Debug::message(_CORE_OID_STEPIS . 'OPENID_STEP_LINK');
             }
             $this->step = OPENID_STEP_LINK;
         } elseif (isset($_SESSION['openid_step'])) {
             if ($debug) {
                 icms_core_Debug::message(_CORE_OID_STEPIS . $_SESSION['openid_step']);
             }
             $this->step = $_SESSION['openid_step'];
         } else {
             if ($debug) {
                 icms_core_Debug::message(_CORE_OID_CHECKINGID);
             }
             // Do we already have a user with this openid
             $member_handler = icms::handler('icms_member');
             $criteria = new icms_db_criteria_Compo();
             $criteria->add(new icms_db_criteria_Item('openid', $this->openid));
             $users =& $member_handler->getUsers($criteria);
             if ($users && count($users) > 0) {
                 $this->step = OPENID_STEP_USER_FOUND;
                 if ($debug) {
                     icms_core_Debug::message(_CORE_OID_FOUNDSTEPIS . 'OPENID_STEP_USER_FOUND');
                 }
                 return $users[0];
             } else {
                 /*
                  * This openid was not found in the users table. Let's ask the user if he wants
                  * to create a new user account on the site or else login with his already registered
                  * account
                  */
//.........這裏部分代碼省略.........
開發者ID:nao-pon,項目名稱:impresscms,代碼行數:101,代碼來源:Openid.php


注:本文中的icms_core_Debug::vardump方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。