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


PHP server_component_tag类代码示例

本文整理汇总了PHP中server_component_tag的典型用法代码示例。如果您正苦于以下问题:PHP server_component_tag类的具体用法?PHP server_component_tag怎么用?PHP server_component_tag使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: generate_contents

 function generate_contents(&$code)
 {
     $list_child =& $this->find_immediate_child_by_class('fetch_list_tag');
     if ($list_child) {
         $code->write_php($list_child->get_component_ref_code() . '->set_path($_SERVER["PHP_SELF"]);');
     }
     $code->write_php($this->get_component_ref_code() . '->fetch_mapped_by_url();');
     server_component_tag::generate_contents($code);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:9,代码来源:mapped.tag.php

示例2:

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

示例3:

 function generate_contents(&$code)
 {
     if (isset($this->attributes['hash_id']) && isset($this->attributes['target'])) {
         $code->write_php($this->get_component_ref_code() . '->make_transfer(\'' . $this->attributes['hash_id'] . '\', \'' . $this->attributes['target'] . '\');');
     }
     parent::generate_contents($code);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:7,代码来源:data_transfer.tag.php

示例4:

 /**
  * 
  * @param code $ _writer
  * @return void 
  * @access protected 
  */
 function generate_contents(&$code)
 {
     $parent_form =& $this->find_parent_by_class('form_tag');
     $target =& $this->parent->find_child($this->attributes['target']);
     $code->write_php($target->get_component_ref_code() . '->register_dataset(' . $parent_form->get_component_ref_code() . '->get_error_dataset());');
     parent::generate_contents($code);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:13,代码来源:errors.tag.php

示例5:

 function generate_contents(&$code)
 {
     if (isset($this->attributes['name']) && isset($this->attributes['type'])) {
         $code->write_php($this->get_component_ref_code() . '->get_param("' . $this->attributes['name'] . '","' . $this->attributes['type'] . '");');
     }
     parent::generate_contents($code);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:7,代码来源:sys_param.tag.php

示例6: explode

 function generate_contents(&$code)
 {
     parent::generate_contents($code);
     if (isset($this->attributes['navigator'])) {
         if ($navigator =& $this->parent->find_child($this->attributes['navigator'])) {
             $limit = $code->get_temp_variable();
             $code->write_php('$' . $limit . '= ' . $navigator->get_component_ref_code() . '->get_items_per_page();');
             $code->write_php($this->get_component_ref_code() . '->set_parameter("limit", $' . $limit . ');');
             $code->write_php('if(isset($_GET["page_' . $navigator->get_server_id() . '"])){');
             $code->write_php($this->get_component_ref_code() . '->set_parameter("offset", ($_GET["page_' . $navigator->get_server_id() . '"]-1)*$' . $limit . ');');
             $code->write_php('}');
         }
     }
     $targets = explode(',', $this->attributes['target']);
     foreach ($targets as $target) {
         if ($target_component =& $this->parent->find_child(trim($target))) {
             $code->write_php($target_component->get_component_ref_code() . '->register_dataset(' . $this->get_component_ref_code() . '->get_dataset());');
         } else {
             debug::write_error('component target not found', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, array('target' => $target));
         }
     }
     if (isset($this->attributes['navigator']) && $navigator) {
         $code->write_php($navigator->get_component_ref_code() . '->set_total_items(' . $this->get_component_ref_code() . '->get_total_count());');
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:25,代码来源:datasource.tag.php

示例7:

 function pre_generate(&$code)
 {
     $parent =& $this->find_parent_by_class('pager_navigator_tag');
     parent::pre_generate($code);
     $code->write_php($this->get_component_ref_code() . '->set("number", ' . $parent->get_component_ref_code() . '->get_total_items());');
     $code->write_php($this->get_component_ref_code() . '->set("more_than_one_page", ' . $parent->get_component_ref_code() . '->has_more_than_one_page());');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:7,代码来源:total.tag.php

示例8:

	/**
	* 
	* @param code $ _writer
	* @return void 
	* @access protected 
	*/
	function post_generate(&$code)
	{
		$code->write_php($this->get_component_ref_code() . '->cache(ob_get_contents());ob_end_clean();');
		$code->write_php('}');
		$code->write_php($this->get_component_ref_code() . '->render();');
		parent::post_generate($code);
	} 
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:13,代码来源:outputcache.tag.php

示例9:

  function generate_contents(&$code)
  {
    $ref = $this->get_component_ref_code();
    $code->write_php("{$ref}->load_metadata();\n");

    parent :: generate_contents($code);

  }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:8,代码来源:metadata.tag.php

示例10:

 /**
  *
  * @param code $ _writer
  * @return void
  * @access protected
  */
 function generate_contents(&$code)
 {
     $parent =& $this->find_parent_by_class('pager_navigator_tag');
     $code->write_php('if (!' . $parent->get_component_ref_code() . '->is_current_page()) {');
     $code->write_php($this->get_component_ref_code() . '->set("href", ' . $parent->get_component_ref_code() . '->get_current_page_uri());');
     $code->write_php($this->get_component_ref_code() . '->set("number", ' . $parent->get_component_ref_code() . '->get_page_number());');
     parent::generate_contents($code);
     $code->write_php('}');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:15,代码来源:number.tag.php

示例11:

 function post_generate(&$code)
 {
     $code->write_php('} else {');
     if ($default =& $this->find_immediate_child_by_class('grid_default_tag')) {
         $default->generate_now($code);
     }
     $code->write_php('}');
     parent::post_generate($code);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:9,代码来源:list.tag.php

示例12:

 /**
  *
  * @param code $ _writer
  * @return void
  * @access protected
  */
 function post_generate(&$code)
 {
     if (!$this->hide_for_current_page) {
         $parent =& $this->find_parent_by_class('pager_navigator_tag');
         $code->write_php('if (!' . $parent->get_component_ref_code() . '->is_last()) {');
     }
     parent::post_generate($code);
     $code->write_php('}');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:15,代码来源:last.tag.php

示例13:

 function generate_contents(&$code)
 {
     $ref = $this->get_component_ref_code();
     if (isset($this->attributes['separator'])) {
         $code->write_php("{$ref}->set_title_separator(\"" . $this->attributes['separator'] . "\");\n");
     }
     $ref = $this->get_component_ref_code();
     $code->write_php("echo {$ref}->get_title();\n");
     parent::generate_contents($code);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:10,代码来源:title.tag.php

示例14:

 /**
  * 
  * @param code $ _writer
  * @return void 
  * @access protected 
  */
 function post_generate(&$code)
 {
     $code->write_php('}');
     $emptychild =& $this->find_immediate_child_by_class('list_default_tag');
     if ($emptychild) {
         $code->write_php(' else {');
         $emptychild->generate_now($code);
         $code->write_php('}');
     }
     parent::post_generate($code);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:17,代码来源:list.tag.php

示例15:

 function generate_contents(&$code)
 {
     $v = '$' . $code->get_temp_variable();
     $code->write_php($this->get_component_ref_code() . '->prepare();');
     $code->write_php('if (!(' . $v . ' = ' . $this->get_component_ref_code() . '->get())) {');
     $code->write_php('ob_start();');
     parent::generate_contents($code);
     $code->write_php($this->get_component_ref_code() . '->write(ob_get_contents());ob_end_flush();');
     $code->write_php('}');
     $code->write_php('else echo ' . $v . ';');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:11,代码来源:outputcache.tag.php


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