Example #1
0
 public function format(Event $Event)
 {
     return \ephFrame\util\String::substitute($this->format, array('priority' => $Event->priority, 'timestamp' => $Event->created->getTimeStamp(), 'date' => $Event->created->format('Y-m-d'), 'time' => $Event->created->format('h:m:s'), 'message' => (string) $Event->message));
 }
Example #2
0
 public function message()
 {
     return String::substitute($this->message, (array) $this);
 }
Example #3
0
 public function testSubstituteRegexp()
 {
     $this->assertEquals(String::substitute('/:user-name/:user.id', array('user.name' => 'wrong', 'user-name' => 'ephigenia', 'user.id' => 23)), '/ephigenia/23');
 }