当前位置: 首页>>代码示例>>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;未经允许,请勿转载。