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


PHP phpCAS::_PHPCAS_CLIENT方法代码示例

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


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

示例1: proxy

 /**
  * phpCAS proxy initializer.
  *
  * @param string $server_version  the version of the CAS server
  * @param string $server_hostname the hostname of the CAS server
  * @param string $server_port     the port the CAS server is running on
  * @param string $server_uri      the URI the CAS server is responding on
  * @param bool   $changeSessionID Allow phpCAS to change the session_id (Single
  * Sign Out/handleLogoutRequests is based on that change)
  *
  * @return a newly created CAS_Client object
  * @note Only one of the phpCAS::client() and phpCAS::proxy functions should be
  * called, only once, and before all other methods (except phpCAS::getVersion()
  * and phpCAS::setDebug()).
  */
 public static function proxy($server_version, $server_hostname, $server_port, $server_uri, $changeSessionID = true)
 {
     phpCAS::traceBegin();
     if (is_object(self::$_PHPCAS_CLIENT)) {
         phpCAS::error(self::$_PHPCAS_INIT_CALL['method'] . '() has already been called (at ' . self::$_PHPCAS_INIT_CALL['file'] . ':' . self::$_PHPCAS_INIT_CALL['line'] . ')');
     }
     if (gettype($server_version) != 'string') {
         phpCAS::error('type mismatched for parameter $server_version (should be `string\')');
     }
     if (gettype($server_hostname) != 'string') {
         phpCAS::error('type mismatched for parameter $server_hostname (should be `string\')');
     }
     if (gettype($server_port) != 'integer') {
         phpCAS::error('type mismatched for parameter $server_port (should be `integer\')');
     }
     if (gettype($server_uri) != 'string') {
         phpCAS::error('type mismatched for parameter $server_uri (should be `string\')');
     }
     // store where the initialzer is called from
     $dbg = debug_backtrace();
     self::$_PHPCAS_INIT_CALL = array('done' => true, 'file' => $dbg[0]['file'], 'line' => $dbg[0]['line'], 'method' => __CLASS__ . '::' . __FUNCTION__);
     // initialize the object $_PHPCAS_CLIENT
     self::$_PHPCAS_CLIENT = new CAS_Client($server_version, true, $server_hostname, $server_port, $server_uri, $changeSessionID);
     phpCAS::traceEnd();
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:40,代码来源:CAS.php

示例2: proxy

 /**
  * phpCAS proxy initializer.
  *
  * @param string $server_version  the version of the CAS server
  * @param string $server_hostname the hostname of the CAS server
  * @param string $server_port     the port the CAS server is running on
  * @param string $server_uri      the URI the CAS server is responding on
  * @param bool   $changeSessionID Allow phpCAS to change the session_id (Single
  * Sign Out/handleLogoutRequests is based on that change)
  *
  * @return a newly created CAS_Client object
  * @note Only one of the phpCAS::client() and phpCAS::proxy functions should be
  * called, only once, and before all other methods (except phpCAS::getVersion()
  * and phpCAS::setDebug()).
  */
 public static function proxy($server_version, $server_hostname, $server_port, $server_uri, $changeSessionID = true)
 {
     phpCAS::traceBegin();
     if (is_object(self::$_PHPCAS_CLIENT)) {
         phpCAS::error(self::$_PHPCAS_INIT_CALL['method'] . '() has already been called (at ' . self::$_PHPCAS_INIT_CALL['file'] . ':' . self::$_PHPCAS_INIT_CALL['line'] . ')');
     }
     // store where the initialzer is called from
     $dbg = debug_backtrace();
     self::$_PHPCAS_INIT_CALL = array('done' => true, 'file' => $dbg[0]['file'], 'line' => $dbg[0]['line'], 'method' => __CLASS__ . '::' . __FUNCTION__);
     // initialize the object $_PHPCAS_CLIENT
     try {
         self::$_PHPCAS_CLIENT = new CAS_Client($server_version, true, $server_hostname, $server_port, $server_uri, $changeSessionID);
     } catch (Exception $e) {
         phpCAS::error(get_class($e) . ': ' . $e->getMessage());
     }
     phpCAS::traceEnd();
 }
开发者ID:bitschift,项目名称:CollabAchievements,代码行数:32,代码来源:CAS.php

示例3: setCasClient

 /**
  * For testing purposes, use this method to set the client to a test double
  *
  * @return void
  */
 public static function setCasClient(\CAS_Client $client)
 {
     self::$_PHPCAS_CLIENT = $client;
 }
开发者ID:jasig,项目名称:phpcas,代码行数:9,代码来源:CAS.php


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