Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix message created/updated initialization #1

Merged
merged 1 commit into from

2 participants

@oparadis

Moves the created/updated initialization into the Model\Message class.

@rande rande merged commit 87e0394 into sonata-project:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 3, 2012
  1. Fix message created/updated initialization

    Olivier Paradis authored
This page is out of date. Refresh to see the latest.
View
1  Backend/AMQPBackend.php
@@ -124,7 +124,6 @@ public function create($type, array $body)
$message->setType($type);
$message->setBody($body);
$message->setState(MessageInterface::STATE_OPEN);
- $message->setCreatedAt(new \DateTime);
return $message;
}
View
6 Entity/Message.php
@@ -20,12 +20,6 @@ class Message extends BaseMessage
*/
protected $id;
- public function __construct()
- {
- $this->createdAt = new \DateTime();
- $this->updatedAt = new \DateTime();
- }
-
/**
* Get id
*
View
6 Model/Message.php
@@ -29,6 +29,12 @@ class Message implements MessageInterface
protected $completedAt;
+ public function __construct()
+ {
+ $this->createdAt = new \DateTime();
+ $this->updatedAt = new \DateTime();
+ }
+
/**
* {@inheritdoc}
*/
Something went wrong with that request. Please try again.