static function output($str_content, $arr_data = array(), $options = array()) { //load the data as array into the temp for replacing later self::$temp = $arr_data; //split the htmlstring for being unicode conform $arr_content = preg_split("/(.|\\\\n)/u", $str_content, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); //now start the handler. -1 because of increment to start by zero and null for telling that is the root layer self::handler($arr_content, -1, null); }
<?php $template = "This text will ouput at once char by char and [[this only when the following var {{script_name}} and method {{static_class::method_name}} exists]] else {{author_name}}"; steplator::output($template, array('author_name' => 'Robert', 'script_name' => 'steplator'));