本文整理汇总了PHP中server_component_tag类的典型用法代码示例。如果您正苦于以下问题:PHP server_component_tag类的具体用法?PHP server_component_tag怎么用?PHP server_component_tag使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了server_component_tag类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16:
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
示例17:
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
示例18: unset
/**
*
* @param code $ _writer
* @return void
* @access protected
*/
function generate_constructor(&$code)
{
parent::generate_constructor($code);
if (array_key_exists('items', $this->attributes)) {
$code->write_php($this->get_component_ref_code() . '->items = \'' . $this->attributes['items'] . '\';');
unset($this->attributes['items']);
}
if (array_key_exists('pages_per_section', $this->attributes)) {
$code->write_php($this->get_component_ref_code() . '->pages_per_section = \'' . $this->attributes['pages_per_section'] . '\';');
unset($this->attributes['pages_per_section']);
}
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:18,代码来源:navigator.tag.php
示例19: array
function get_component_ref_code()
{
if (isset($this->attributes['mirror_of'])) {
if ($mirrored_pager =& $this->parent->find_child($this->attributes['mirror_of'])) {
return $mirrored_pager->get_component_ref_code();
} else {
debug::write_error('mirror_of pager component not found', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, array('mirror_of' => $this->attributes['mirror_of']));
}
} else {
return parent::get_component_ref_code();
}
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:12,代码来源:navigator.tag.php
示例20:
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
注:本文中的server_component_tag类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论