本文整理汇总了PHP中OA::getAvailableSSLExtensions方法的典型用法代码示例。如果您正苦于以下问题:PHP OA::getAvailableSSLExtensions方法的具体用法?PHP OA::getAvailableSSLExtensions怎么用?PHP OA::getAvailableSSLExtensions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OA
的用法示例。
在下文中一共展示了OA::getAvailableSSLExtensions方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAvailableSSLExtensions
/**
* A method to detect the available SSL enabling extensions
*
* @return mixed An array of the available extensions, or false if none is present
*/
public static function getAvailableSSLExtensions($forceReload = false)
{
if ($forceReload || !isset(self::$sslExtensions)) {
self::$sslExtensions = OA::getAvailableSSLExtensions();
}
return self::$sslExtensions;
}
示例2: __construct
function __construct($path, $server, $port = 0, $proxy = '', $proxy_port = 0, $proxy_user = '', $proxy_pass = '')
{
if ($aExtensions = OA::getAvailableSSLExtensions()) {
$this->hasCurl = in_array('curl', $aExtensions);
$this->hasOpenssl = in_array('openssl', $aExtensions);
}
$this->verifyPeer = false;
$this->caFile = MAX_PATH . '/etc/curl-ca-bundle.crt';
parent::__construct($path, $server, $port);
}
示例3: OA_XML_RPC_Client
function OA_XML_RPC_Client($path, $server, $port = 0, $proxy = '', $proxy_port = 0, $proxy_user = '', $proxy_pass = '')
{
if ($aExtensions = OA::getAvailableSSLExtensions()) {
$this->hasCurl = in_array('curl', $aExtensions);
$this->hasOpenssl = in_array('openssl', $aExtensions);
}
$this->verifyPeer = false;
// This CA file is reused in openXMarket plugin
// to setup curl in Zend_Http_Client_Adapter_Curl in same way as here
$this->caFile = MAX_PATH . '/etc/curl-ca-bundle.crt';
parent::XML_RPC_Client($path, $server, $port);
}
示例4: canUseSSL
/**
* This should be a private static method, but the current test implementation
* doesn't allow it to be declared as static
*
* @return boolean
* @static
*/
private function canUseSSL()
{
return (bool) OA::getAvailableSSLExtensions();
}
示例5:
require_once '../../init.php';
// Required files
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/lib/OA/Permission.php';
// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER, OA_ACCOUNT_TRAFFICKER);
/*-------------------------------------------------------*/
/* Main code */
/*-------------------------------------------------------*/
if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
// Show Dashboard if Dashboard is enabled
if ($GLOBALS['_MAX']['CONF']['ui']['dashboardEnabled']) {
OX_Admin_Redirect::redirect('dashboard.php');
} else {
OX_Admin_Redirect::redirect('agency-index.php');
}
}
if (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
// Show Dashboard if Dashboard is enabled, Sync is enabled and PHP is SSL enabled
if ($GLOBALS['_MAX']['CONF']['ui']['dashboardEnabled'] && $GLOBALS['_MAX']['CONF']['sync']['checkForUpdates'] && OA::getAvailableSSLExtensions()) {
OX_Admin_Redirect::redirect('dashboard.php');
} else {
OX_Admin_Redirect::redirect('advertiser-index.php');
}
}
if (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
OX_Admin_Redirect::redirect('stats.php?entity=advertiser&breakdown=history&clientid=' . OA_Permission::getEntityId());
}
if (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
OX_Admin_Redirect::redirect('stats.php?entity=affiliate&breakdown=history&affiliateid=' . OA_Permission::getEntityId());
}