public function apagar(Permissao $objPermissao) { $v = $this->_getValidacao(); $v->setRules($objPermissao->getId(), 'required', 'ID'); $v->validar(); return $this->_getRepositorio()->alterar($objPermissao); }
public function visualizar(Permissao $objPermissao) { try { $this->_stat = $this->_getConn()->prepare('SELECT * FROM tblpermissao WHERE per_id = :per_id AND per_excluido = 0 AND per_status = 1'); $this->_stat->bindValue(':per_id', $objPermissao->getId(), \PDO::PARAM_INT); $this->_stat->execute(); return $this->_getPermissao($this->_stat->fetch(\PDO::FETCH_ASSOC)); } catch (\PDOException $e) { throw new \model\conexao\Excecao($e->getMessage()); } }