src/Alg/HtmlParser.php
public function getFavoriteIcon( $throwException = TRUE )
	{
		$values	= array(
			'apple-touch-icon',
			'APPLE-TOUCH-ICON',
			'shortcut icon',
			'SHORTCUT ICON',
			'icon',
			'ICON',
		);
		foreach( $values as $value )
		{
			$tags	= $this->getTags( 'link', 'rel', $value );
			if( count( $tags ) )
				return $tags[0]->getAttribute( 'href' );
		}
		if( $throwException )
			throw new RuntimeException( 'No Favorite Icon Link Tag found.' );
		return "";
	}
public function getFavoriteIcon( $throwException = TRUE )
	{
		$values	= array(
			'apple-touch-icon',
			'APPLE-TOUCH-ICON',
			'shortcut icon',
			'SHORTCUT ICON',
			'icon',
			'ICON',
		);
		foreach( $values as $value )
		{
			$tags	= $this->getTags( 'link', 'rel', $value );
			if( count( $tags ) )
				return $tags[0]->getAttribute( 'href' );
		}
		if( $throwException )
			throw new RuntimeException( 'No Favorite Icon Link Tag found.' );
		return "";
	}
public function getFavoriteIcon ( $ throwException = TRUE ) { $ values = array ( 'apple-touch-icon' , 'APPLE-TOUCH-ICON' , 'shortcut icon' , 'SHORTCUT ICON' , 'icon' , 'ICON' , ) ; foreach ( $ values as $ value ) { $ tags = $ this -> getTags ( 'link' , 'rel' , $ value ) ; if ( count ( $ tags ) ) return $ tags [ 0 ] -> getAttribute ( 'href' ) ; } if ( $ throwException ) throw new RuntimeException ( 'No Favorite Icon Link Tag found.' ) ; return "" ; }
Returns Favorite Icon URL or throws Exception.
@access		public
@param		bool			$throwException		Flag: throw Exception if not found, otherwise return empty String
@return		string
@throws		RuntimeException
Returns Favorite Icon URL or throws Exception .