<?php
class BusinessExemploAluno extends MBusiness
{
var $idAluno;
var $nome;
var $sexo;
var $telefone;
var $idCurso;
var $curso;
function __construct($data=NULL)
{
parent::__construct('exemplo',$data);
$this->nome = '';
$this->sexo = '';
$this->telefone = '';
$this->idCurso = ':null';
}
function getById($id)
{
$this->idAluno = $id;
$this->retrieve();
return $this;
}
function setIdAluno($idAluno)
{
$this->idAluno = $idAluno;
}
function getIdAluno()
{
return $this->idAluno;
}
function setNome($nome)
{
$this->nome = $nome;
}
function getNome()
{
return $this->nome;
}
function setSexo($sexo)
{
$this->sexo = $sexo;
}
function getSexo()
{
return $this->sexo;
}
function setTelefone($telefone)
{
$this->telefone = $telefone;
}
function getTelefone()
{
return $this->telefone;
}
function setData($data)
{
$this->setIdAluno($data->idAluno);
$this->setNome($data->nome);
$this->setSexo($data->sexo);
$this->setTelefone($data->telefone);
}
function listByNome($nome)
{
$criteria = $this->getCriteria();
$criteria->addCriteria('nome','LIKE', "$nome");
$criteria->addOrderAttribute('nome');
return $criteria->retrieveAsQuery();
}
function matricular($curso)
{
}
}
?>
tutoriais/miolo/arquivos/aluno.class.txt · Modificada em: 2009/04/14 21:04 (external edit)