function setHandlersRepeat() { if (!self::$buffer) { self::$buffer = buffer::gets(); } if (self::$buffer) { foreach (self::$buffer as $k => $v) { $data = buffer::get($v['app'], $v['tmpl'], $v['data'], false); // replace {load ...} on data self::$code = str_replace($v['replace'], $data, self::$code); } } }