当前位置: 首页>>代码示例>>PHP>>正文


PHP compiler_directive_tag::pre_generate方法代码示例

本文整理汇总了PHP中compiler_directive_tag::pre_generate方法的典型用法代码示例。如果您正苦于以下问题:PHP compiler_directive_tag::pre_generate方法的具体用法?PHP compiler_directive_tag::pre_generate怎么用?PHP compiler_directive_tag::pre_generate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在compiler_directive_tag的用法示例。


在下文中一共展示了compiler_directive_tag::pre_generate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

	/**
	* 
	* @param code $ _writer
	* @return void 
	* @access protected 
	*/
	function pre_generate(&$code)
	{
		parent::pre_generate($code);

		$parent = &$this->find_parent_by_class('pager_navigator_tag');
		$code->write_php('if (' . $parent->get_component_ref_code() . '->next()) {');
	} 
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:13,代码来源:list.tag.php

示例2: trim

 function pre_generate(&$code)
 {
     parent::pre_generate($code);
     $counter = $code->get_temp_variable();
     $code->write_php('$' . $counter . ' = trim(' . $this->get_dataspace_ref_code() . '->get_counter());');
     $code->write_php('if (($' . $counter . ') && ($' . $counter . '%' . $this->count . ' == 0)) {');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:7,代码来源:separator.tag.php

示例3:

 function pre_generate(&$code)
 {
     if (!isset($this->attributes['type'])) {
         $this->attributes['type'] = 'string';
     }
     parent::pre_generate($code);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:7,代码来源:parameter.tag.php

示例4: trim

 function pre_generate(&$code)
 {
     parent::pre_generate($code);
     $counter = '$' . $code->get_temp_variable();
     $code->write_php($counter . ' = trim(' . $this->get_dataspace_ref_code() . '->get_counter());');
     $code->write_php("if (\t({$counter} > 0) && \r\n\t\t\t\t\t\t\t({$counter} < " . $this->get_dataspace_ref_code() . "->get_total_row_count()) &&\r\n\t\t\t\t\t\t \t({$counter} % " . $this->count . " == 0)) {");
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:7,代码来源:separator.tag.php

示例5: trim

 /**
  * 
  * @param code $ _writer
  * @return void 
  * @access protected 
  */
 function pre_generate(&$code)
 {
     parent::pre_generate($code);
     $tempvar = $code->get_temp_variable();
     $code->write_php('$' . $tempvar . ' = trim(' . $this->get_dataspace_ref_code() . '->get(\'' . $this->field . '\'));');
     $code->write_php('if (!empty($' . $tempvar . ')) {');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:13,代码来源:optional.tag.php

示例6:

 /**
  *
  * @param code $ _writer
  * @return void
  * @access protected
  */
 function pre_generate(&$code)
 {
     parent::pre_generate($code);
     $tempvar = '$' . $code->get_temp_variable();
     $code->write_php($tempvar . ' = ' . $this->get_dataspace_ref_code() . '->get(\'' . $this->field . '\');');
     $code->write_php('if (!is_array(' . $tempvar . ' )) ' . $tempvar . ' = utf8_trim(' . $tempvar . ');');
     $code->write_php('if (empty(' . $tempvar . ')) {');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:14,代码来源:default.tag.php

示例7: define

 function pre_generate(&$code)
 {
     parent::pre_generate($code);
     if (!defined('HINT_SCRIPT_INCLUDED')) {
         $code->write_html("<script type='text/javascript' src='/shared/js/hint.js'></script>");
         define('HINT_SCRIPT_INCLUDED', true);
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:8,代码来源:hint.tag.php

示例8:

	function pre_generate(&$code)
	{
	  $id = $this->attributes['tab_id'];
	  
		$code->write_html("<div id='{$id}_content'>");
		
		parent :: pre_generate($code);
	}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:8,代码来源:tab_item_content.tag.php

示例9:

 /**
  * Calls the parent pre_generate() method then writes
  * "$dataspace->prepare();" to the compiled template.
  *
  * @param code $ _writer
  * @return void
  * @access protected
  */
 function pre_generate(&$code)
 {
     parent::pre_generate($code);
     $code->write_php($this->get_dataspace_ref_code() . '->prepare();');
     if ($this->is_debug_enabled()) {
         $code->write_html("<div class='debug-tmpl-main'>");
         $this->_generate_debug_editor_link_html($code, $this->source_file);
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:17,代码来源:root_compiler_component.class.php

示例10:

 /**
  * Calls the parent pre_generate() method then writes
  * "$dataspace->prepare();" to the compiled template.
  * 
  * @param code $ _writer
  * @return void 
  * @access protected 
  */
 function pre_generate(&$code)
 {
     parent::pre_generate($code);
     $code->write_php($this->get_dataspace_ref_code() . '->prepare();');
     if ($this->is_debug_enabled()) {
         $code->write_html("<div style='border:dashed 1px blue;padding: 10px 10px 10px 10px;'>");
         $this->_generate_debug_editor_link_html($code, $this->source_file);
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:17,代码来源:root_compiler_component.class.php

示例11:

	function pre_generate(&$code)
	{
    $code->write_html("
    	<table>
    	<tr>
    		<td height=100% valign=top>
		");
		
		parent :: pre_generate($code);
	}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:10,代码来源:tabs_contents.tag.php

示例12:

  function pre_generate(&$code)
  {
    $id = $this->attributes['tab_id'];

    $code->write_html("<td id={$id}>
          <table border='0' cellspacing='0' cellpadding='0' style='height:100%'>
          <tr>
            <td nowrap {$this->parent->parent->tab_class}><a href='JavaScript:void(0);'>");

    parent :: pre_generate($code);
  }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:11,代码来源:tab_item_label.tag.php

示例13: if

 function pre_generate(&$code)
 {
     $value = '$' . $code->get_temp_variable();
     $parent = $this->get_dataspace_ref_code();
     $radio_child =& $this->find_child_by_class('input_tag');
     $label_child =& $this->find_child_by_class('label_tag');
     $radio = $radio_child->get_component_ref_code();
     $label = $label_child->get_component_ref_code();
     $code->write_php("\r\n    if ({$value} = {$parent}->get('id'))\r\n    {\r\n      {$radio}->set_attribute('value', {$value});\r\n      {$radio}->set_attribute('id', {$value});\r\n      {$label}->set_attribute('for', {$value});\r\n    }\r\n    ");
     parent::pre_generate($code);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:11,代码来源:radio_selector.tag.php

示例14: trim

 /**
  * 
  * @param code $ _writer
  * @return void 
  * @access protected 
  */
 function pre_generate(&$code)
 {
     parent::pre_generate($code);
     $value = 'true';
     if (isset($this->attributes['value']) && !(bool) $this->attributes['value']) {
         $value = 'false';
     }
     $tempvar = $code->get_temp_variable();
     $code->write_php('$' . $tempvar . ' = trim(' . $this->get_dataspace_ref_code() . '->get("status"));');
     $code->write_php('if ((boolean)(constant("' . $this->const . '") & $' . $tempvar . ') === ' . $value . ') {');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:17,代码来源:status.tag.php

示例15: isset

 function pre_generate(&$code)
 {
     parent::pre_generate($code);
     $value = 'true';
     if (isset($this->attributes['value']) && !(bool) $this->attributes['value']) {
         $value = 'false';
     }
     $tempvar = $code->get_temp_variable();
     $actions_tempvar = $code->get_temp_variable();
     $code->write_php('$' . $actions_tempvar . ' = ' . $this->get_dataspace_ref_code() . '->get("actions");');
     $code->write_php('if (isset($' . $actions_tempvar . '["publish"]) && isset($' . $actions_tempvar . '["unpublish"])) {');
     $code->write_php('$' . $tempvar . ' = trim(' . $this->get_dataspace_ref_code() . '->get("status"));');
     $code->write_php('if ((boolean)(constant("SITE_OBJECT_PUBLISHED_STATUS") & $' . $tempvar . ') === ' . $value . ') {');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:14,代码来源:published.tag.php


注:本文中的compiler_directive_tag::pre_generate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。