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


PHP CopixUrl::getCurrentUrl方法代碼示例

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


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

示例1: testValues

 public function testValues()
 {
     CopixConfig::instance()->url_requestedscript_variable = 'PHP_SELF';
     // Verifions que l'on retourne le bon hote
     $this->assertEquals($_SERVER['HTTP_HOST'], CopixUrl::getRequestedDomain());
     $this->assertRegexp('/^\\/.*test\\.php$/', CopixUrl::getRequestedScript());
     $this->assertEquals('test.php', CopixUrl::getRequestedScriptName());
     $this->assertEquals('http://', CopixUrl::getRequestedProtocol());
     $currentUrl = CopixUrl::getCurrentUrl();
 }
開發者ID:JVS-IS,項目名稱:ICONITO-EcoleNumerique,代碼行數:10,代碼來源:copixtest_copixurltest.class.php

示例2: smarty_function_currenturl

/**
 * Plugin smarty type fonction
 * Purpose:  get the current url.
 *
 * Input:   assign   = (optional) name of the template variable we'll assign
 *                      the output to instead of displaying it directly
 *
 * Examples:
 */
function smarty_function_currenturl($params, &$this)
{
    $assign = CopixUrl::getCurrentUrl();
    if (isset($params['assign'])) {
        $this->assign($params['assign'], $assign);
        return '';
    } else {
        return $assign;
    }
}
開發者ID:BackupTheBerlios,項目名稱:phpannu-svn,代碼行數:19,代碼來源:function.currenturl.php

示例3: smarty_function_currenturl

/**
 * Plugin smarty type fonction
 * Purpose:  get the current url.
 *
 * Input:   assign   = (optional) name of the template variable we'll assign
 *                      the output to instead of displaying it directly
 *
 * Examples:
 */
function smarty_function_currenturl($params, &$me)
{
    if (isset($params['notxml'])) {
        $isxml = $params['notxml'] == 'true' ? false : true;
    } else {
        $isxml = true;
    }
    $assign = CopixUrl::getCurrentUrl($isxml);
    if (isset($params['assign'])) {
        $me->assign($params['assign'], $assign);
        return '';
    } else {
        return $assign;
    }
}
開發者ID:JVS-IS,項目名稱:ICONITO-EcoleNumerique,代碼行數:24,代碼來源:function.currenturl.php

示例4: smarty_function_commentthis

function smarty_function_commentthis($params, &$smarty)
{
    extract($params);
    if (empty($displaytype)) {
        $displaytype = 'list';
    }
    if (empty($type)) {
        $smarty->trigger_error('commentthis: missing type parameter');
    }
    if (empty($id)) {
        $smarty->trigger_error('commentthis: missing id parameter');
    }
    if (empty($dest)) {
        $dest = CopixUrl::get('comment||getList', array('type' => $type, 'id' => $id, 'back' => $back));
    }
    $dao =& CopixDAOFactory::create('comment|Comment');
    $services =& CopixClassesFactory::create('comment|commentservices');
    $services->enableComment($id, $type);
    switch ($displaytype) {
        case 'link':
            $nbComment = $dao->getNbComment($id, $type);
            $toReturn = '<a href=' . $dest . '>' . $nbComment . ' ';
            $toReturn .= $nbComment > 1 ? CopixI18N::get('comment|comment.messages.comments') : CopixI18N::get('comment|comment.messages.comment');
            $toReturn .= '</a>';
            break;
        case 'form':
            $back = CopixUrl::getCurrentUrl();
            CopixActionGroup::process('comment|comment::doPrepareAdd', array('type' => $type, 'id' => $id, 'back' => $back));
            $toEdit = CopixActionGroup::process('comment|comment::_getSessionComment');
            $toReturn = CopixZone::process('comment|AddComment', array('toEdit' => $toEdit));
            break;
        case 'list':
        default:
            $toReturn = CopixZone::process('comment|CommentList', array('type' => $type, 'id' => $id));
            break;
    }
    return $toReturn;
}
開發者ID:BackupTheBerlios,項目名稱:phpannu-svn,代碼行數:38,代碼來源:function.commentthis.php


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