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


PHP CApi::LibrariesPath方法代碼示例

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


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

示例1: DAVLibrariesAutoload

function DAVLibrariesAutoload($className)
{
    if (0 === strpos($className, 'afterlogic') && false !== strpos($className, '\\')) {
        include CApi::LibrariesPath() . 'afterlogic/' . str_replace('\\', '/', substr($className, 11)) . '.php';
    } else {
        if (0 === strpos($className, 'Sabre') && false !== strpos($className, '\\')) {
            include CApi::LibrariesPath() . 'Sabre/' . str_replace('\\', '/', substr($className, 6)) . '.php';
        }
    }
}
開發者ID:hallnewman,項目名稱:webmail-lite,代碼行數:10,代碼來源:autoload.php

示例2: class_exists

<?php

/*
 * Copyright 2004-2015, AfterLogic Corp.
 * Licensed under AGPLv3 license or AfterLogic license
 * if commercial version of the product was purchased.
 * See the LICENSE file for a full license statement.
 */
class_exists('CApi') or die;
CApi::Inc('common.plugins.two-factor-auth');
include_once CApi::LibrariesPath() . 'PHPGangsta/GoogleAuthenticator.php';
class TwoFactorAuthenticationPlugin extends AApiTwoFactorAuthPlugin
{
    protected $logs = false;
    protected $discrepancy = 2;
    public static $setAccountIsLoggedIn = false;
    /**
     * @param string $sText
     */
    private function _writeLogs($sText)
    {
        if ($this->logs === true) {
            $this->Log($sText);
        }
    }
    /**
     * @param CApiPluginManager $oPluginManager
     */
    public function __construct(CApiPluginManager $oPluginManager)
    {
        parent::__construct('1.0', $oPluginManager);
開發者ID:nsine,項目名稱:webmail-lite,代碼行數:31,代碼來源:index.php

示例3: array

<?php

include_once __DIR__ . '/libraries/afterlogic/api.php';
include_once CApi::LibrariesPath() . '/ProjectSeven/Notifications.php';
$sContents = file_get_contents('php://input');
$aInputData = array();
if (strlen($sContents) > 0) {
    parse_str($sContents, $aInputData);
} else {
    $aInputData = isset($_REQUEST) && is_array($_REQUEST) ? $_REQUEST : array();
}
//$sMethod = isset($aInputData['method']) ? $aInputData['method'] : '';
$sMethod = strlen($_SERVER['PATH_INFO']) > 0 ? $_SERVER['REQUEST_METHOD'] . ' ' . $_SERVER['PATH_INFO'] : '';
$sToken = isset($aInputData['token']) ? $aInputData['token'] : '';
$aSecret = CApi::DecodeKeyValues($sToken);
$bMethod = in_array($sMethod, array('GET /token', 'POST /account', 'PUT /account/update', 'DELETE /account', 'PUT /account/enable', 'PUT /account/disable', 'PUT /account/password', 'GET /account/list', 'GET /account/exists', 'GET /account', 'POST /domain', 'PUT /domain/update', 'DELETE /domain', 'GET /domain/list', 'GET /domain/exists', 'GET /domain'));
$aResult = array('method' => $sMethod);
if (!CApi::GetConf('labs.rest', true)) {
    $aResult['message'] = 'rest api disabled';
    $aResult['errorCode'] = \ProjectSeven\Notifications::RestApiDisabled;
    $aResult['result'] = false;
} else {
    if (class_exists('CApi') && CApi::IsValid() && $bMethod) {
        /* @var $oApiDomainsManager CApiDomainsManager */
        $oApiDomainsManager = CApi::Manager('domains');
        /* @var $oApiTenantsManager CApiTenantsManager */
        $oApiTenantsManager = CApi::Manager('tenants');
        /* @var $oApiUsersManager CApiUsersManager */
        $oApiUsersManager = CApi::Manager('users');
        /* @var $oApiIntegratorManager CApiIntegratorManager */
        $oApiIntegratorManager = CApi::Manager('integrator');
開發者ID:BertLasker,項目名稱:Catch-design,代碼行數:31,代碼來源:rest.php


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