當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。