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


PHP Registry::getUrl方法代碼示例

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


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

示例1: delete

 public function delete()
 {
     $url = Registry::getUrl();
     $id = $_REQUEST["id"] ? $_REQUEST["id"] : $url->vars[0];
     $user = new User($id);
     if ($user->id) {
         if ($user->delete()) {
             Registry::addMessage("Usuario eliminado satisfactoriamente", "success");
         }
     }
     Url::redirect(Url::site("users"));
 }
開發者ID:flafuente,項目名稱:parrillas,代碼行數:12,代碼來源:users.php

示例2: delete

 public function delete()
 {
     $url = Registry::getUrl();
     $id = $_REQUEST["id"] ? $_REQUEST["id"] : $url->vars[0];
     $tipo = new Tipo($id);
     if ($tipo->id) {
         if ($tipo->delete()) {
             Registry::addMessage("Tipo de entrada eliminado satisfactoriamente", "success");
         }
     }
     Url::redirect(Url::site("tipos"));
 }
開發者ID:flafuente,項目名稱:parrillas,代碼行數:12,代碼來源:tipos.php

示例3: rememberFilter

function rememberFilter($name)
{
    $url = Registry::getUrl();
    $app = $url->app;
    if (isset($_REQUEST[$name])) {
        if (!$_REQUEST[$name]) {
            unset($_SESSION[$app . '.' . $name]);
        } else {
            $_SESSION[$app . '.' . $name] = $_REQUEST[$name];
        }
    } else {
        $_REQUEST[$name] = $_SESSION[$app . '.' . $name];
    }
}
開發者ID:flafuente,項目名稱:parrillas,代碼行數:14,代碼來源:functions.php

示例4: delete

 public function delete()
 {
     $url = Registry::getUrl();
     $id = $_REQUEST["id"] ? $_REQUEST["id"] : $url->vars[0];
     $mosca = new Mosca($id);
     if ($mosca->id) {
         if ($mosca->delete()) {
             Registry::addMessage("Mosca eliminada satisfactoriamente", "success");
             //Log
             Log::add(LOG_DELETE_MOSCA, $mosca);
         }
     }
     Url::redirect(Url::site("moscas"));
 }
開發者ID:flafuente,項目名稱:parrillas,代碼行數:14,代碼來源:moscas.php

示例5: defined

<?php

defined('_EXE') or die('Restricted access');
?>

<?php 
$pages = $pag['limit'] ? ceil($pag['total'] / $pag['limit']) : $pag['total'];
$url = Registry::getUrl();
$app = $url->app;
$action = $url->action;
?>

<?php 
if ($pages) {
    ?>
    <ul class="pagination">
        <li class="<?php 
    if ($pag['limitStart'] / $pag['limit'] == 0) {
        echo "disabled";
    }
    ?>
">
            <a data-app="<?php 
    echo $app;
    ?>
" data-action="<?php 
    echo $action;
    ?>
" data-limit="<?php 
    echo (int) $pag['limit'];
    ?>
開發者ID:flafuente,項目名稱:parrillas,代碼行數:31,代碼來源:pagination.view.php

示例6: delete

 public function delete()
 {
     $url = Registry::getUrl();
     $id = $_REQUEST["id"] ? $_REQUEST["id"] : $url->vars[0];
     $entrada = new Entrada($id);
     if ($entrada->id) {
         if ($entrada->delete()) {
             Registry::addMessage("Entrada eliminada satisfactoriamente", "success");
             //Log
             Log::add(LOG_DELETE_ENTRADA, $entrada);
         }
     }
     Url::redirect(Url::site("entradas"));
 }
開發者ID:flafuente,項目名稱:parrillas,代碼行數:14,代碼來源:entradas.php


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