/**
	* 
	* @param code $ _writer
	* @return void 
	* @access protected 
	*/
	function pre_generate(&$code)
	{
		$this->content_ref = get_new_server_id();
		parent::pre_generate($code);
		$code->write_php('if (!' . $this->get_component_ref_code() . '->is_cached()) {');
		$code->write_php('ob_start();');
	} 
 /**
  * Returns the identifying server ID. It's value it determined in the
  * following order;
  * <ol>
  * <li>The XML id attribute in the template if it exists</li>
  * <li>The value of $this->server_id</li>
  * <li>An ID generated by the get_new_server_id() function</li>
  * </ol>
  * 
  * @see get_new_server_id
  * @return string value identifying this component
  * @access protected 
  */
 function get_server_id()
 {
     if (!empty($this->attributes['id'])) {
         return $this->attributes['id'];
     } elseif (!empty($this->server_id)) {
         return $this->server_id;
     } else {
         $this->server_id = get_new_server_id();
         return $this->server_id;
     }
 }
 /**
  * Returns the identifying server ID. It's value it determined in the
  * following order;
  * <ol>
  * <li>The XML id attribute in the template if it exists</li>
  * <li>The XML name attribute in the template if it exists</li>
  * <li>The value of $this->server_id</li>
  * <li>An ID generated by the get_new_server_id() function</li>
  * </ol>
  * 
  * @see get_new_server_id
  * @return string value identifying this component
  * @access protected 
  */
 function get_server_id()
 {
     if (!empty($this->attributes['id'])) {
         return $this->attributes['id'];
     } elseif (!empty($this->attributes['name'])) {
         return str_replace('[]', '', $this->attributes['name']);
     } elseif (!empty($this->server_id)) {
         return $this->server_id;
     } else {
         $this->server_id = get_new_server_id();
         return $this->server_id;
     }
 }
Example #4
0
 /**
  * 
  * @param code_writer $ 
  * @return void 
  * @access protected 
  */
 function generate_second(&$code)
 {
     $select_second_object_ref_code = get_new_server_id();
     $select_second =& $this->find_child_by_class('select_second_tag');
     $select_second->sel_component = $this->get_component_ref_code();
     $select_second->select_second_object_ref_code = $select_second_object_ref_code;
     $select_second->attributes['group_name'] = $this->attributes['name'];
     $code->write_php($this->get_component_ref_code() . '->prepare_second();');
     $code->write_php('$' . $select_second_object_ref_code . '=' . $this->get_component_ref_code() . '->get_second();');
     $select_second->pre_generate($code);
     $select_second->generate_contents($code);
     $select_second->post_generate($code);
 }