File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change
1
+ 2011-11-18 Evgeny V. Kokovikhin
2
+
3
+ * main/Messages/TextMessage.class.php, main/Messages/TextFileReceiver.class.php:
4
+ a bit optimize: don't needed to make Timestamp twice
5
+
1
6
2011-11-17 Sergey S. Sergeev
2
7
3
8
* main/Base/LightMetaProperty.class.php: speed up insert or update operations,
6
11
2011-11-14 Dmitry V. Snezhinskiy
7
12
8
13
* main/Utils/AMQP/Pecl/AMQPPeclChannel.class.php :
9
- customize AMQPPeclChannel Exception. Author Evgenia T. Tekalin
14
+ customize AMQPPeclChannel Exception. Author Evgenia T. Tekalin.
10
15
11
16
2011-11-14 Evgeny V. Kokovikhin
12
17
Original file line number Diff line number Diff line change @@ -69,8 +69,7 @@ public function receive($uTimeout = null)
69
69
70
70
Assert::isNotNull ($ time );
71
71
72
- $ result = TextMessage::create ()->
73
- setTimestamp (Timestamp::create ($ time ))->
72
+ $ result = TextMessage::create (Timestamp::create ($ time ))->
74
73
setText ($ text );
75
74
76
75
return $ result ;
Original file line number Diff line number Diff line change @@ -15,17 +15,17 @@ final class TextMessage implements Message
15
15
private $ timestamp = null ;
16
16
private $ text = null ;
17
17
18
- public static function create ()
18
+ public static function create (Timestamp $ timestamp = null )
19
19
{
20
- return new self ;
20
+ return new self ( $ timestamp ) ;
21
21
}
22
22
23
- public function __construct ()
23
+ public function __construct (Timestamp $ timestamp = null )
24
24
{
25
- $ this ->timestamp = Timestamp::makeNow ();
25
+ $ this ->timestamp = $ timestamp ?: Timestamp::makeNow ();
26
26
}
27
27
28
- public function setTimestamp ($ timestamp )
28
+ public function setTimestamp (Timestamp $ timestamp )
29
29
{
30
30
$ this ->timestamp = $ timestamp ;
31
31
You can’t perform that action at this time.
0 commit comments