本文整理汇总了PHP中Usuarios::getNome方法的典型用法代码示例。如果您正苦于以下问题:PHP Usuarios::getNome方法的具体用法?PHP Usuarios::getNome怎么用?PHP Usuarios::getNome使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Usuarios
的用法示例。
在下文中一共展示了Usuarios::getNome方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getNome
/**
* {@inheritDoc}
*/
public function getNome()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getNome', array());
return parent::getNome();
}
示例2: codificaUsuario
public function codificaUsuario(Usuarios $usuario)
{
return md5($usuario->getNome() . $usuario->getSenha());
}
示例3: editarAction
public function editarAction()
{
$tp = new LoginTipo();
$ut = new Util();
$us = new Usuarios();
$tiposLogin = $tp->getAllLoginTipo();
$request = $this->getRequest();
$id = $request->getParam('id');
$usuario = $us->getUserByLoginId($id);
if (!$usuario) {
$this->_helper->redirector('listar', 'usuarios');
}
if ($request->isPost()) {
$erro = false;
$msg = '';
$nascimento = empty($request->getPost('Nascimento')) ? NULL : $ut->dateToSql($request->getPost('Nascimento'));
$now = $ut->nowDateSql();
$rg = $ut->limpaDados($request->getPost('Rg'));
$cpf = $ut->limpaDados($request->getPost('Cpf'));
$telefone = $ut->limpaDados($request->getPost('Telefone'));
$celular = $ut->limpaDados($request->getPost('Celular'));
$us->setNome($request->getPost('Nome'));
$us->setSobrenome($request->getPost('Sobrenome'));
$us->setEmail($request->getPost('Email'));
$us->setLoginId($id);
$us->setRg($rg);
$us->setCpf($cpf);
$us->setNascimento($nascimento);
$us->setTelefone($telefone);
$us->setCelular($celular);
$us->setSexo($request->getPost('Sexo'));
$us->setCadastradoEm($now);
$data = array('nome' => $us->getNome(), 'sobrenome' => $us->getSobrenome(), 'email' => $us->getEmail(), 'login_id' => $us->getLoginId(), 'rg' => $us->getRg(), 'cpf' => $us->getCpf(), 'nascimento' => $us->getNascimento(), 'telefone' => $us->getTelefone(), 'celular' => $us->getCelular(), 'sexo' => $us->getSexo());
$us->saveUser($data, $id);
$adapter = new Zend_File_Transfer_Adapter_Http();
$adapter->setDestination(APPLICATION_PATH . '/../data/temp');
$upload = new Zend_File_Transfer();
$files = $upload->getFileInfo();
if ($files['Avatar']['tmp_name']) {
if (!file_exists(ROOT_DIR . DS . 'painel' . DS . 'images' . DS . 'usuario' . DS . $id)) {
mkdir(ROOT_DIR . DS . 'painel' . DS . 'images' . DS . 'usuario' . DS . $id, 0777, true);
}
foreach ($files as $file => $info) {
if ($upload->isUploaded($file)) {
//$extension = substr($info['name'], strrpos($info['name'], '.') + 1);
$filename = 'avatar.jpg';
$adapter->addFilter('Rename', array('target' => APPLICATION_PATH . '/../data/temp/' . $filename, 'overwrite' => true));
$adapter->receive($info['name']);
if (!$adapter->receive()) {
$messages = $adapter->getMessages();
echo implode("\n", $messages);
exit;
}
//setFileName::Url2
$us->setAvatar($filename);
$imanee = new Imanee\Imanee(APPLICATION_PATH . '/../data/temp/' . $filename);
//resized
$imanee->resize(300, 300, false)->write(ROOT_DIR . DS . 'painel' . DS . 'images' . DS . 'usuario' . DS . $id . DS . $filename, 80);
//full
//$imanee->resize(1024, 768)
// ->write(ROOT_DIR . DS . 'site' . DS . 'images' . DS . 'galeria' . DS . $album_id . DS . 'f_' . $filename, 80);
unlink(APPLICATION_PATH . '/../data/temp/' . $filename);
}
}
}
if ($erro) {
$msg = 'Ocorreu um erro, tente novamente';
$this->view->msg = $msg;
} else {
$this->_helper->redirector('listar', 'usuarios');
}
}
$this->view->usuario = $usuario;
$this->view->tipos = $tiposLogin;
$this->view->util = $ut;
$this->render();
}