当前位置: 首页>>代码示例>>PHP>>正文


PHP Persona::delete方法代码示例

本文整理汇总了PHP中Persona::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Persona::delete方法的具体用法?PHP Persona::delete怎么用?PHP Persona::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Persona的用法示例。


在下文中一共展示了Persona::delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

        case 1:
            $result = $a->save($_POST);
            if ($result != false) {
                if ($result == 1) {
                    $result = "finCorrecto";
                }
            } else {
                $result = "errorAlta";
            }
            break;
        case 3:
            $result = $a->editarPersona($_POST);
            if ($result != false) {
                $result = "finCorrecto";
            } else {
                $result = "errorUpdate";
            }
            break;
        case 2:
            $result = $a->delete($_POST['id']);
            if ($result) {
                $result = "finCorrecto";
            } else {
                $result = "errorBorrar";
            }
            break;
        default:
            break;
    }
    echo $result;
}
开发者ID:jsivori,项目名称:Essence,代码行数:31,代码来源:clientes.php

示例2: catch

    try {
        $persona->load($persona_id);
    } catch (PAException $e) {
        // this is usually because the Persona has already been deleted
        // and thus doen't exist
        Logger::log("ERROR: trying to delete Persona: " . $persona_id . "\n" . $e->getMessage());
        $msg = "Couldn't disconnect the Service.<br />" . $e->getMessage();
        // we do not throw this
    }
    if ($persona->user_id) {
        // check if Persona belongs to user
        if ($persona->user_id != $user->user_id) {
            $msg = "Couldn't disconnect the Service.<br />It is not associated with your account";
        } else {
            // ok, let's kill it
            Persona::delete($persona_id);
            $msg = "The service has been successfully disconnected.";
        }
    }
}
if (@$_POST['profile_type'] == 'external') {
    global $msg;
    // so it will be seen in page creation context
    // let's see if this is a configure_XYZ call
    $config_call = false;
    foreach ($_POST as $k => $v) {
        if (preg_match('/^configure_/', $k)) {
            $config_call = $k;
        }
    }
    if ($config_call) {
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:31,代码来源:external.php

示例3: session_start

<?php

session_start();
require_once '../../twig/lib/Twig/Autoloader.php';
require_once '../../../Model/BinDb.php';
require_once '../../../Model/Persona.php';
if ($_SESSION['logeado'] == "Si") {
    if (isset($_POST['codigo_persona'])) {
        $codigo_persona = $_POST['codigo_persona'];
        if (!empty($codigo_persona)) {
            $aRespuesta = ['estado' => Persona::delete($codigo_persona)];
            echo json_encode($aRespuesta);
        }
    }
} else {
    header("Location: /Controller/partePublica/actividades.php");
}
开发者ID:antonio06,项目名称:Php,代码行数:17,代码来源:eliminarPersona.php


注:本文中的Persona::delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。