6 public function render($arEvents)
8 $s = "Days Age Name Event Date\n";
9 $s .= "---- --- ---------------------------------------- -------------------- ----------\n";
10 foreach ($arEvents as $event) {
15 $this->str_pad($event->title, 40),
16 $this->str_pad($event->type, 20),
23 public function str_pad(
24 $input, $pad_length, $pad_string = ' ', $pad_type = STR_PAD_RIGHT
26 $l = mb_strlen($input, 'utf-8');
27 if ($l >= $pad_length) {
31 $p = str_repeat($pad_string, $pad_length - $l);
32 if ($pad_type == STR_PAD_RIGHT) {