english/libraries/joomla/document/html/html.php
/**
	 * Merge the HTML document head data
	 *
	 * @param   array  $data  The document head data in array form
	 *
	 * @return  void
	 *
	 * @since   11.1
	 */
Merge the HTML document head data
@param   array  $data  The document head data in array form

@return  void


Merge the HTML document head data @param array $data The document head data in array form @return void
public function mergeHeadData($data)
	{
  		if (empty($data) || !is_array($data)) {
			return;
		}
		$this->title		= (isset($data['title']) && !empty($data['title']) && !stristr($this->title, $data['title'])) ? $this->title.$data['title'] : $this->title;
		$this->description	= (isset($data['description']) && !empty($data['description']) && !stristr($this->description, $data['description'])) ? $this->description. $data['description'] : $this->description;
		$this->link			= (isset($data['link'])) ? $data['link'] : $this->link;
		if (isset($data['metaTags'])) {
			foreach($data['metaTags'] AS $type1=>$data1)
			{
				$booldog = $type1 == 'http-equiv' ? true : false;
				foreach($data1 AS $name2=>$data2)
				{
					$this->setMetaData($name2, $data2, $booldog);
				}
			}
		}
		$this->_links		= (isset($data['links']) && !empty($data['links']) && is_array($data['links'])) ? array_unique(array_merge($this->_links, $data['links'])) : $this->_links;
		$this->_styleSheets	= (isset($data['styleSheets']) && !empty($data['styleSheets']) && is_array($data['styleSheets'])) ? array_merge($this->_styleSheets, $data['styleSheets']) : $this->_styleSheets;
		if (isset($data['style'])) {
			foreach($data['style'] AS $type=>$stdata)
			{
				if (!isset($this->_style[strtolower($type)]) || !stristr($this->_style[strtolower($type)],$stdata)) {
					$this->addStyleDeclaration($stdata, $type);
 				}
			}
		}
		$this->_scripts		= (isset($data['scripts']) && !empty($data['scripts']) && is_array($data['scripts'])) ? array_merge($this->_scripts, $data['scripts']) : $this->_scripts;
		if (isset($data['script'])) {
			foreach($data['script'] AS $type=>$sdata)
			{
				if (!isset($this->_script[strtolower($type)]) || !stristr($this->_script[strtolower($type)],$sdata)) {
					$this->addScriptDeclaration($sdata, $type);
				}
			}
		}
		$this->_custom = (isset($data['custom']) && !empty($data['custom'])&& is_array($data['custom'])) ? array_unique(array_merge($this->_custom, $data['custom'])) : $this->_custom;
	}
public function mergeHeadData ( $ data ) { if ( empty ( $ data ) || ! is_array ( $ data ) ) { return ; } $ this -> title = ( isset ( $ data [ 'title' ] ) && ! empty ( $ data [ 'title' ] ) && ! stristr ( $ this -> title , $ data [ 'title' ] ) ) ? $ this -> title . $ data [ 'title' ] : $ this -> title ; $ this -> description = ( isset ( $ data [ 'description' ] ) && ! empty ( $ data [ 'description' ] ) && ! stristr ( $ this -> description , $ data [ 'description' ] ) ) ? $ this -> description . $ data [ 'description' ] : $ this -> description ; $ this -> link = ( isset ( $ data [ 'link' ] ) ) ? $ data [ 'link' ] : $ this -> link ; if ( isset ( $ data [ 'metaTags' ] ) ) { foreach ( $ data [ 'metaTags' ] AS $ type1 => $ data1 ) { $ booldog = $ type1 == 'http-equiv' ? true : false ; foreach ( $ data1 AS $ name2 => $ data2 ) { $ this -> setMetaData ( $ name2 , $ data2 , $ booldog ) ; } } } $ this -> _links = ( isset ( $ data [ 'links' ] ) && ! empty ( $ data [ 'links' ] ) && is_array ( $ data [ 'links' ] ) ) ? array_unique ( array_merge ( $ this -> _links , $ data [ 'links' ] ) ) : $ this -> _links ; $ this -> _styleSheets = ( isset ( $ data [ 'styleSheets' ] ) && ! empty ( $ data [ 'styleSheets' ] ) && is_array ( $ data [ 'styleSheets' ] ) ) ? array_merge ( $ this -> _styleSheets , $ data [ 'styleSheets' ] ) : $ this -> _styleSheets ; if ( isset ( $ data [ 'style' ] ) ) { foreach ( $ data [ 'style' ] AS $ type => $ stdata ) { if ( ! isset ( $ this -> _style [ strtolower ( $ type ) ] ) || ! stristr ( $ this -> _style [ strtolower ( $ type ) ] , $ stdata ) ) { $ this -> addStyleDeclaration ( $ stdata , $ type ) ; } } } $ this -> _scripts = ( isset ( $ data [ 'scripts' ] ) && ! empty ( $ data [ 'scripts' ] ) && is_array ( $ data [ 'scripts' ] ) ) ? array_merge ( $ this -> _scripts , $ data [ 'scripts' ] ) : $ this -> _scripts ; if ( isset ( $ data [ 'script' ] ) ) { foreach ( $ data [ 'script' ] AS $ type => $ sdata ) { if ( ! isset ( $ this -> _script [ strtolower ( $ type ) ] ) || ! stristr ( $ this -> _script [ strtolower ( $ type ) ] , $ sdata ) ) { $ this -> addScriptDeclaration ( $ sdata , $ type ) ; } } } $ this -> _custom = ( isset ( $ data [ 'custom' ] ) && ! empty ( $ data [ 'custom' ] ) && is_array ( $ data [ 'custom' ] ) ) ? array_unique ( array_merge ( $ this -> _custom , $ data [ 'custom' ] ) ) : $ this -> _custom ; }
Merge the HTML document head data
 @param   array  $data  The document head data in array form
Merge the HTML document head data @param array $data The document head data in array form