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)); }
public function message() { return String::substitute($this->message, (array) $this); }
public function testSubstituteRegexp() { $this->assertEquals(String::substitute('/:user-name/:user.id', array('user.name' => 'wrong', 'user-name' => 'ephigenia', 'user.id' => 23)), '/ephigenia/23'); }