Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

施宇 / icsales

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Find file
BlameHistoryPermalink
Switch branch/tag
  • icsales
  • ThinkPHP
  • Library
  • Vendor
  • TemplateLite
  • internal
  • template.fetch_compile_include.php
  • 施宇's avatar
    init · 14f95149
    施宇 committed 6 years ago
    14f95149
template.fetch_compile_include.php 1.29 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
<?php
/**
 * Template Lite template_fetch_compile_include template internal module
 *
 * Type:	 template
 * Name:	 template_fetch_compile_include
 */

function template_fetch_compile_include($_templatelite_include_file, $_templatelite_include_vars, &$object)
{
	if ($object->debugging)
	{
		$object->_templatelite_debug_info[] = array('type'	  => 'template',
											'filename'  => $_templatelite_include_file,
											'depth'	 => ++$object->_inclusion_depth,
											'exec_time' => array_sum(explode(' ', microtime())) );
		$included_tpls_idx = count($object->_templatelite_debug_info) - 1;
	}

	$object->_vars = array_merge($object->_vars, $_templatelite_include_vars);
	$_templatelite_include_file = $object->_get_resource($_templatelite_include_file);
	if(isset($object->_confs[0]))
	{
		array_unshift($object->_confs, $object->_confs[0]);
		$_compiled_output = $object->_fetch_compile($_templatelite_include_file);
		array_shift($object->_confs);
	}
	else
	{
		$_compiled_output = $object->_fetch_compile($_templatelite_include_file);
	}

	$object->_inclusion_depth--;

	if ($object->debugging)
	{
		$object->_templatelite_debug_info[$included_tpls_idx]['exec_time'] = array_sum(explode(' ', microtime())) - $object->_templatelite_debug_info[$included_tpls_idx]['exec_time'];
	}
	return $_compiled_output;
}

?>