本文整理汇总了PHP中Manager::getSysTime方法的典型用法代码示例。如果您正苦于以下问题:PHP Manager::getSysTime方法的具体用法?PHP Manager::getSysTime怎么用?PHP Manager::getSysTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Manager
的用法示例。
在下文中一共展示了Manager::getSysTime方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: novoAluno
public function novoAluno()
{
$db = $this->getDatabase('exemplos');
try {
$transaction = $db->beginTransaction();
$pessoa = new Pessoa();
$pessoa->setData($this->data);
$pessoa->save();
$this->data->idPessoa = $pessoa->getId();
$aluno = new Aluno();
$aluno->setData($this->data);
$aluno->save();
$mail = $this->getMail();
$mail->Subject = 'Novo registro de aluno - ' . $aluno->getMatricula();
$mail->Body = 'Criado novo registro de aluno - ' . $aluno->getMatricula() . ' em ' . Manager::getSysTime();
$mail->addAddress($this->data->email);
$ok = $mail->send();
$mensagem = 'Aluno criado com sucesso.';
$transaction->commit();
} catch (\Exception $e) {
// rollback da transação em caso de algum erro
$transaction->rollback();
$this->data->error = true;
$mensagem = $e->getMessage();
}
return $mensagem;
}
示例2: sendEmail
public function sendEmail()
{
try {
$time = Manager::getSysTime();
$ipaddress = $_SERVER['REMOTE_ADDR'];
$mail = new PHPMailer();
$mail->IsSMTP();
// telling the class to use SMTP
$mail->Host = Manager::getConf('mailer.smtpServer');
// SMTP server
$mail->From = Manager::getConf('mailer.smtpFrom');
$mail->FromName = Manager::getConf('mailer.smtpFromName');
$mail->Subject = $this->data->assunto;
$mail->isHTML(false);
$mail->CharSet = 'utf-8';
$body = 'Enviada de: ' . $ipaddress . ' em ' . $time;
$mail->Body = $body . "\n" . $this->data->mensagem;
$mail->WordWrap = 100;
$mail->addAddress($this->data->email);
$ok = $mail->send();
$mail->clearAllRecipients();
$this->renderPrompt('information', 'Mensagem enviada com sucesso!');
} catch (Exception $e) {
$this->renderPrompt('error', $e->getMessage());
}
}
示例3: newTimeLine
public function newTimeLine($tl)
{
$timeline = 'tl_' . $tl;
$result = $this->getCriteria()->select('max(numOrder) as max')->where("upper(timeline) = upper('{$timeline}')")->asQuery()->getResult();
$max = $result[0]['max'];
$order = ($max ?: 0) + 1;
$this->setPersistent(false);
$this->setTimeLine($timeline);
$this->setNumOrder($order);
$this->setTlDateTime(\Manager::getSysTime());
$author = \Manager::getLogin()->getLogin();
$this->setAuthor($author);
$this->save();
return $timeline;
}
示例4: __construct
public function __construct()
{
$this->host = $_SERVER['SERVER_NAME'];
$this->path = $this->getPathInfo();
mtrace('MRequest path = ' . $this->path);
$this->querystring = $this->getQueryString();
$this->method = $this->getRequestType();
$this->domain = $this->getServerName();
$this->remoteAddress = $this->getUserHostAddress();
$this->contentType = isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : '';
$this->port = $this->getPort();
$this->secure = $this->getIsSecureConnection();
$this->headers = $_SERVER;
$this->cookies = isset($_COOKIES) ? $_COOKIES : '';
$dispatch = Manager::getOptions('dispatch');
/*
$p = strpos($this->path,$dispatch);
if ($p !== false) {
$this->path = str_replace($dispatch, '', $this->path);
}
$this->baseUrl = Manager::getConf('url.base');
$p = ($this->path && $this->baseUrl) ? strpos($this->path,$this->baseUrl) : false;
if (($this->baseUrl != '') && ($p !== false)) {
$this->path = str_replace($this->baseUrl, '', $this->path);
}
*
*/
$this->baseUrl = $this->getBaseUrl();
$this->date = Manager::getSysTime();
$this->isNew = true;
$this->user = '';
$this->password = '';
$this->isLoopback = $this->remoteAddress == '127.0.0.1';
$this->params = $_REQUEST;
$this->url = $this->getUrl();
$this->dispatch = $this->getBase() . $dispatch;
$this->resolveFormat();
$auth = isset($_SERVER['AUTH_TYPE']) ? $_SERVER['AUTH_TYPE'] : '';
if ($auth != '' && substr($auth, 0, 6) == "Basic ") {
$this->user = $_SERVER['PHP_AUTH_USER'];
$this->password = $_SERVER['PHP_AUTH_PW'];
}
//mtrace('MRequest path = ' . $this->path);
//mtrace('MRequest base = ' . $this->getBase());
//mtrace('MRequest baseURL = ' . $this->getBaseURL());
//mtrace('MRequest url = ' . $this->url);
}
示例5: handlerDb
/**
* Brief Description.
* Complete Description.
*
* @param $msg (tipo) desc
*
* @returns (tipo) desc
*
*/
private function handlerDb($msg)
{
$login = Manager::getLogin();
$uid = $login ? $login->getLogin() : '';
$ts = Manager::getSysTime();
$db = Manager::getDatabase('manager');
$idLog = $db->getNewId('seq_manager_log');
$sql = new MSQL('idlog, timestamp, login, msg, host', 'manager_log');
$db->execute($sql->insert(array($idLog, $ts, $uid, $msg, $this->host)));
}
示例6: formTextField
public function formTextField()
{
$this->data->email = 'a@teste.com';
$this->data->nomeValidator = false;
$this->data->currency = Manager::currency(1234.56);
$this->data->dataNascimento = Manager::date(Manager::getSysDate());
$this->data->timestamp = Manager::timestamp(Manager::getSysTime());
$this->render();
}
示例7: applyClass
public function applyClass()
{
$result = str_replace('$_classC', ucfirst($this->var['class']), $this->templateFile);
$result = str_replace('$_class', $this->var['class'], $result);
$result = str_replace('$_moduleC', ucfirst($this->var['module']), $result);
$result = str_replace('$_module', $this->var['module'], $result);
$result = str_replace('$_constants', $this->var['constants'], $result);
$result = str_replace('$_properties', $this->var['properties'], $result);
$result = str_replace('$_methods', $this->var['methods'], $result);
$result = str_replace('$_comment', $this->var['comment'], $result);
$result = str_replace('$_package', $this->var['package'], $result);
$result = str_replace('$_ormmap', $this->var['ormmap'], $result);
$result = str_replace('$_actions', $this->var['actions'], $result);
$result = str_replace('$_descriptionC', ucfirst($this->var['description'] ?: 'id'), $result);
$result = str_replace('$_description', $this->var['description'] ?: 'id', $result);
$result = str_replace('$_configLog', $this->var['configLog'], $result);
$result = str_replace('$_configValidators', $this->var['configValidators'], $result);
$result = str_replace('$_configConverters', $this->var['configConverters'], $result);
$result = str_replace('$_extends', $this->var['extends'] ?: '\\MBusinessModel', $result);
$result = str_replace('$_time', Manager::getSysTime(), $result);
$result = str_replace('$_default', $this->var['default'], $result);
$this->resultFile = $result;
}