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


PHP complex_array类代码示例

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


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

示例1: perform

	function perform()
	{
		$object_data = fetch_mapped_by_url();
		
		$parent_data = fetch_one_by_node_id($object_data['parent_node_id']);
		$path = $parent_data['path'];
		
		$params = complex_array :: array_merge($_GET, $_POST);

		$sep = '';
		$query = '';
		
		$flat_params = array();
		complex_array :: to_flat_array($params, $flat_params);
		
		foreach ($flat_params as $key => $value)
		{
			$query .= $sep . $key . '=' . urlencode($value);
			$sep = '&';
		} 
		if (!empty($query))
			$path .= '?' . $query;
		
		return new redirect_response(RESPONSE_STATUS_SUCCESS, $path);
	}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:25,代码来源:display_paragraph_action.class.php

示例2: _do_get_shipping_options

 function _do_get_shipping_options($shipping_configuration)
 {        
   $this->_clean_cookie();
   
   $this->_browse_to_home_page();
   
   $express_html = $this->_get_express_shipping_options_html($shipping_configuration);
     
   $ground_html = $this->_get_ground_shipping_options_html($shipping_configuration);
   
   if($express_html === false)
     $express_options = array();
   else
     $express_options = $this->_parse_html_options($express_html);
         
   if($ground_html === false)
     $ground_options = array();
   else
   {
     $ground_options = $this->_parse_html_options($ground_html);
     
     foreach($ground_options as $key => $value)
     {
       $ground_options[$key]['ground'] = true;
     }
   }
       
   $options = complex_array :: array_merge($express_options, $ground_options);
   
   if(empty($options))
     return false;
   
   return $options;
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:34,代码来源:fedex_shipping_locator.class.php

示例3: _define_datamap

  function _define_datamap()
	{
	  return complex_array :: array_merge(
	      parent :: _define_datamap(),
	      array(
  				'url' => 'url',
  				'new_window' => 'new_window',
	      )
	  );     
	}  
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:10,代码来源:edit_navigation_item_action.class.php

示例4: _define_attributes_definition

 function _define_attributes_definition()
 {
   return complex_array :: array_merge(
       parent :: _define_attributes_definition(),
       array(
       'content' => array('search' => true),
       'annotation' => array('search' => true),
       'identifier' => array('search' => false)
       ));
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:10,代码来源:pictured_news_object.class.php

示例5: _define_class_properties

	function _define_class_properties()
	{
		return complex_array :: array_merge(
					parent :: _define_attributes_definition(),
					array('abstract_class' => true)
				);
	}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:7,代码来源:period_object.class.php

示例6: _define_datamap

  function _define_datamap()
	{
	  return complex_array :: array_merge(
	      parent :: _define_datamap(),
	      array(
  				'content' => 'content',
	      )
	  );     
	}   
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:9,代码来源:edit_feedback_action.class.php

示例7: _define_attributes_definition

	function _define_attributes_definition()
	{
		return complex_array :: array_merge(
				parent :: _define_attributes_definition(),
				array(
				'question' => array('search' => true),
				'answer' => array('search' => true)
				));
	}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:9,代码来源:faq_object.class.php

示例8: _define_datamap

 function _define_datamap()
 {
   return complex_array :: array_merge(
       parent :: _define_datamap(),
       array(
         'object_content' => 'content',
         'file_id' => 'file_id'
       )
   );
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:10,代码来源:create_pricelist_object_action.class.php

示例9: _define_attributes_definition

	function _define_attributes_definition()
	{
		return complex_array :: array_merge(
				parent :: _define_attributes_definition(),
				array(
				'title' => '',
				'name' => array('type' => 'numeric'),
				'search' => array('search' => true),
				));		
	}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:10,代码来源:site_object_auto_identifier.test.php

示例10: _fetch

	function & _fetch(&$counter, $params)
	{
		if(!$result =& parent :: _fetch($counter, $params))
			return $result;
		
		$user_ids = complex_array :: get_column_values('user_id', $result);

		$fetcher =& fetcher :: instance();
		
		$params = array(
			'restrict_by_class' => false
		);
		
		$user_counter = 0;
		$users =& $fetcher->fetch_by_ids($user_ids, 'user_object', $user_counter, $params, 'fetch_by_ids');

		foreach($result as $key => $data)
		{
			if (!isset($users[$data['user_id']]))
				continue;
				
			$customer_data = $users[$data['user_id']];
			$result[$key]['user_name'] = $customer_data['name'];
			$result[$key]['user_lastname'] = $customer_data['lastname'];
			$result[$key]['user_secondname'] = $customer_data['secondname'];
			$result[$key]['user_email'] = $customer_data['email'];
			$result[$key]['user_phone'] = $customer_data['phone'];
		}	

		return $result;
	}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:simple_orders_list_datasource.class.php

示例11: array

 function &fetch_sub_branch($path, $loader_class_name, &$counter, $params = array(), $fetch_method = 'fetch_by_ids')
 {
     $tree =& limb_tree::instance();
     $site_object =& site_object_factory::instance($loader_class_name);
     if (!isset($params['restrict_by_class']) || isset($params['restrict_by_class']) && (bool) $params['restrict_by_class']) {
         $class_id = $site_object->get_class_id();
     } else {
         $class_id = null;
     }
     if (isset($params['check_expanded_parents'])) {
         $check_expanded_parents = (bool) $params['check_expanded_parents'];
     } else {
         $check_expanded_parents = false;
     }
     if (isset($params['include_parent'])) {
         $include_parent = (bool) $params['include_parent'];
     } else {
         $include_parent = false;
     }
     $depth = isset($params['depth']) ? $params['depth'] : 1;
     if (!($nodes = $tree->get_accessible_sub_branch_by_path($path, $depth, $include_parent, $check_expanded_parents, $class_id))) {
         return array();
     }
     $object_ids = complex_array::get_column_values('object_id', $nodes);
     if (!count($object_ids)) {
         return array();
     }
     $result =& $this->fetch_by_ids($object_ids, $loader_class_name, $counter, $params, $fetch_method);
     return $result;
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:30,代码来源:fetcher.class.php

示例12: _process_result_array

  function _process_result_array($arr)
  {
    if(complex_array :: get_max_column_value('hosts', $arr, $index) !== false)
      $arr[$index]['max_hosts'] = 1;

    if(complex_array :: get_max_column_value('hits', $arr, $index) !== false)
      $arr[$index]['max_hits'] = 1;

    if(complex_array :: get_max_column_value('home_hits', $arr, $index) !== false)
      $arr[$index]['max_home_hits'] = 1;

    if(complex_array :: get_max_column_value('audience', $arr, $index) !== false)
      $arr[$index]['max_audience'] = 1;

    $result = array();
    foreach($arr as $index => $data)
    {
      if(date('w', $data['time']+60*60*24) == 1)
        $data['new_week'] = 1;

      $result[$index] = $data;
    }

    return $result;
  }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:25,代码来源:stats_hits_hosts_list_datasource.class.php

示例13: _valid_perform

	function _valid_perform(&$request, &$response)
	{
		$object_data =& $this->_load_object_data();

		$data_to_import['id'] = $object_data['id'];
		$data_to_import['node_id'] = $object_data['node_id'];
		$data_to_import['parent_node_id'] = $object_data['parent_node_id'];
		$data_to_import['identifier'] = $object_data['identifier'];
		$data_to_import['title'] = $object_data['title'];
		
		complex_array :: map($this->datamap, $this->dataspace->export(), $data_to_import);
		
		if (!isset($data_to_import['status']))
			$data_to_import['status'] = $object_data['status'];
			
		$this->object->import_attributes($data_to_import);
		
		if(!$this->_update_object_operation())
		{
		  $request->set_status(REQUEST_STATUS_FAILURE);
			return;
		}	

		$this->indexer->add($this->object);
		
		if(isset($data_to_import['identifier']) && $object_data['identifier'] != $data_to_import['identifier'])
		{
			$this->_handle_changed_identifier($data_to_import['identifier']);
		}	

	  $request->set_status(REQUEST_STATUS_FORM_SUBMITTED);
	  
	  fetcher :: flush_cache();
	}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:34,代码来源:form_edit_site_object_action.class.php

示例14: get_dataset

	function & get_dataset(&$counter, $params=array())
	{
		$counter = 0;
		
		$mapped_node = map_request_to_node();
		
		$links_manager = new links_manager();
		
		$groups = array();
		
		if(isset($params['group_identifier']))
		{
		  if($group = $links_manager->fetch_group_by_identifier($params['group_identifier']))
		    $groups[$group['id']] = $group;
		}
		else
		  $groups = $links_manager->fetch_groups();

		if (!is_array($groups) || !count($groups))
		  return new empty_dataset();

		if(isset($params['back_links']) && $params['back_links'])
		  $links = $links_manager->fetch_back_links($mapped_node['id'], array_keys($groups));
		else
		  $links = $links_manager->fetch_target_links($mapped_node['id'], array_keys($groups));

		if (!is_array($links) || !count($links))
		  return new array_dataset($groups);
		
		$target_node_ids = complex_array :: get_column_values('target_node_id', $links);
				
		if (!is_array($target_node_ids) || !count($target_node_ids))
		  return new array_dataset($groups);

		$site_object_class_name = isset($params['loader_class_name']) ? $params['loader_class_name'] : 'site_object';
		$objects =& fetch_by_node_ids($target_node_ids, $site_object_class_name, $counter, array(
		  'restrict_by_class' => false
		));
		
		$result = array();
		
		foreach($groups as $group_id => $group)
		{
      $groups[$group_id]['links'] = array();
      
		  foreach($links as $link_id => $link)
		  {
		    if ($link['group_id']!= $group_id)
		      continue;
		    
		    //if (!isset($objects[$link['target_node_id']]))
		    //  continue;
        
        $link_data = array_merge($objects[$link['target_node_id']], $link);
        $groups[$group_id]['links'][$link_id] = $link_data;
		  }
		}
		
		return new array_dataset($groups);
	}		
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:60,代码来源:node_links_datasource.class.php

示例15: set_phpbb_rank_action

	function set_phpbb_rank_action($name = 'set_phpbb_rank', $merge_definition=array())
	{		
		$definition = array(
			'site_object' => 'user_object'
		);
		
		parent :: form_action($name, complex_array :: array_merge($definition, $merge_definition));
	}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:8,代码来源:set_phpbb_rank_action.class.php


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