本文整理汇总了PHP中Operation::getDateTimeObject方法的典型用法代码示例。如果您正苦于以下问题:PHP Operation::getDateTimeObject方法的具体用法?PHP Operation::getDateTimeObject怎么用?PHP Operation::getDateTimeObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Operation
的用法示例。
在下文中一共展示了Operation::getDateTimeObject方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _makeMessage
/**
* Полное сообщение с описанием операции (для email)
*
* @param Operation $operation
* @return Swift_Message
*/
private function _makeMessage(Operation $operation)
{
$from = array(sfConfig::get('app_notification_email_from') => sfConfig::get('app_notification_email_name'));
$to = $operation->getUser()->getUserMail();
$subject = "Easyfinance.ru - напоминание об операции";
$body = sprintf($this->_template, $operation->getDateTimeObject('date')->format('d.m.y'), $operation->getCategory()->getName(), $operation->getAccount()->getName(), abs($operation->getAmount()), $operation->getAccount()->getCurrency()->getCode(), $operation->getComment());
return $this->_mailer->compose($from, $to, $subject, $body);
}
示例2: _makeMessage
/**
* Сообщение вида:
* ДАТА, СУММА ВАЛЮТА, КАТЕГОРИЯ, СЧЕТ, КОММЕНТАРИЙ
*
* @param Operation $operation
* @return string
*/
private function _makeMessage($operation)
{
$words = array($operation->getDateTimeObject('date')->format('d.m'), abs($operation->getAmount()) . ' ' . $operation->getAccount()->getCurrency()->getCode(), (string) strip_tags($operation->getCategory()->getName()), (string) strip_tags($operation->getAccount()->getName()), strip_tags($operation->getComment()));
return $this->_fixMessageLenth($words);
}