本文整理汇总了PHP中Cliente::getCliente方法的典型用法代码示例。如果您正苦于以下问题:PHP Cliente::getCliente方法的具体用法?PHP Cliente::getCliente怎么用?PHP Cliente::getCliente使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cliente
的用法示例。
在下文中一共展示了Cliente::getCliente方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkLogin
function checkLogin()
{
session_start();
if (!$_SESSION["cliente"] or !($_SESSION["cliente"] = Cliente::getCliente($_SESSION["cliente"]->getValue("id_cliente")))) {
$_SESSION["cliente"] = "";
header("Location: login.php");
exit;
} else {
}
}
示例2: persists
public function persists(Cliente $entity)
{
$this->entity = $entity->getCliente();
return $this;
}
示例3: catch
<?php
$id = $_GET['id'];
try {
$conexao = new \PDO('mysql:host=localhost;dbname=clientes', 'root', 'admin');
} catch (Exception $e) {
echo $e->getMessage();
}
require_once 'cliente.php';
$cliente = new Cliente($conexao);
$cliente->setId($id);
$cli = $cliente->getCliente();
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CRUD com Bootstrap 3</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">