path); foreach ($view->data as $key => $value) { $contents = str_replace( '{'.$key.'}', $value, $contents ); } return $contents; } }