Skip to content

Instantly share code, notes, and snippets.

@meltingice
Created September 17, 2009 04:13
Show Gist options
  • Save meltingice/188341 to your computer and use it in GitHub Desktop.
Save meltingice/188341 to your computer and use it in GitHub Desktop.
<?
private function parse_view($html){
$html = preg_replace(
array(
"/\{using ([^}]*)\}/i",
"/\{include ([^}]*)\}/i",
"/\{func ([A-Za-z_]*)->([^}]*)\(([^\)]*)\)\}/i"
),
array(
"<?
include_once('".$this->theme_path.'models/$1.php\');
$$1 = new $1($this->osimo);
?>',
'<? $this->osimo->theme->include_file("$1"); ?>',
'<? $$1->$2($3); ?>'
)
,$html);
return $html;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment