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


PHP server_component_tag::generate_contents方法代码示例

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


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

示例1:

 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

示例2:

 /**
  * 
  * @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

示例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:

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

示例5: 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

示例6:

  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

示例7:

 /**
  *
  * @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

示例8: 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

示例9:

 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

示例10:

 function generate_contents(&$code)
 {
     if (isset($this->attributes['target'])) {
         $target = 'target=' . $this->attributes['target'];
     } else {
         $target = '';
     }
     $code->write_php('echo "<a ' . $target . ' href=" . ' . $this->get_component_ref_code() . '->get_current_template_source_link() . ">"');
     parent::generate_contents($code);
     $code->write_php('echo "</a>"');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:11,代码来源:template_source.tag.php

示例11:

 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

示例12:

 function generate_contents(&$code)
 {
     $child_list =& $this->find_immediate_child_by_class('list_list_tag');
     if (isset($this->attributes['offset_path'])) {
         $code->write_php($this->get_component_ref_code() . '->set_offset_path("' . $this->attributes['offset_path'] . '");');
     }
     if ($child_list) {
         $code->write_php($child_list->get_component_ref_code() . '->register_dataset(' . $this->get_component_ref_code() . '->get_breadcrumbs_dataset());');
     }
     parent::generate_contents($code);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:11,代码来源:breadcrumbs.tag.php

示例13:

 function generate_contents(&$code)
 {
     parent::generate_contents($code);
     if (isset($this->attributes['navigator'])) {
         $code->write_php($this->get_component_ref_code() . '->set("navigator_id", "' . $this->attributes['navigator'] . '");');
         $code->write_php($this->get_component_ref_code() . '->setup_navigator();');
     }
     $code->write_php($this->get_component_ref_code() . '->set("target", "' . $this->attributes['target'] . '");');
     $code->write_php($this->get_component_ref_code() . '->setup_target();');
     if (isset($this->attributes['navigator'])) {
         $code->write_php($this->get_component_ref_code() . '->fill_navigator();');
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:13,代码来源:datasource.tag.php

示例14:

  function generate_contents(&$code)
  {
    $ref = $this->get_component_ref_code();

    if(isset($this->attributes['resolve_by'])
        && $this->attributes['resolve_by'] == 'path')
      $this->_set_path_resolver($code);
    else
      $this->_set_identifier_resolver($code);

    $code->write_php("{$ref}->get_string();\n");

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

示例15:

  function generate_contents(&$code)
  {
    $ref = $this->get_component_ref_code();

    if(isset($this->attributes['identifier']))
      $code->write_php("{$ref}->set(\"identifier\", \"". $this->attributes['identifier'] ."\");\n");
    else
      $code->write_php("{$ref}->set(\"identifier\", " . $this->parent->get_dataspace_ref_code() ."->get('icon'));\n");

    if(isset($this->attributes['variation']))
      $code->write_php("{$ref}->set(\"variation\", \"". $this->attributes['variation'] ."\");\n");

    $code->write_php("{$ref}->get_icon_path();\n");

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


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