src/FS/File/ICal/Builder.php
protected static function buildLine( $name, $param, $content )
	{
		$params	= array();
		foreach( $param as $key => $value )
			$params[]	= strtoupper( trim( $key ) )."=".$value;
		$param	= implode( ",", $params );
		if( $param )
		{
			$param	= " ;".$param;
			if( strlen( $param ) > 75 )
			{
				$rest	= $param;
				$param	= "";
				while( strlen( $rest ) > 75 )
				{
					$param	.= substr( $rest, 0, 74 ).self::$lineBreak;
					$rest	= " ".substr( $rest, 74 );
				}
			}
			$param	= self::$lineBreak.$param;
		}

		$content	= ":".$content;
		if( strlen( $content ) > 75 )
		{
			$rest	= $content;
			$content	= "";
			while( strlen( $rest ) > 75 )
			{
				$content	.= substr( $rest, 0, 74 ).self::$lineBreak;
				$rest	= " ".substr( $rest, 74 );
			}
		}

		$line	= strtoupper( $name ).$param.$content;
		$line	= $line;
		return $line;
	}
protected static function buildLine( $name, $param, $content )
	{
		$params	= array();
		foreach( $param as $key => $value )
			$params[]	= strtoupper( trim( $key ) )."=".$value;
		$param	= implode( ",", $params );
		if( $param )
		{
			$param	= " ;".$param;
			if( strlen( $param ) > 75 )
			{
				$rest	= $param;
				$param	= "";
				while( strlen( $rest ) > 75 )
				{
					$param	.= substr( $rest, 0, 74 ).self::$lineBreak;
					$rest	= " ".substr( $rest, 74 );
				}
			}
			$param	= self::$lineBreak.$param;
		}

		$content	= ":".$content;
		if( strlen( $content ) > 75 )
		{
			$rest	= $content;
			$content	= "";
			while( strlen( $rest ) > 75 )
			{
				$content	.= substr( $rest, 0, 74 ).self::$lineBreak;
				$rest	= " ".substr( $rest, 74 );
			}
		}

		$line	= strtoupper( $name ).$param.$content;
		$line	= $line;
		return $line;
	}
protected static function buildLine ( $ name , $ param , $ content ) { $ params = array ( ) ; foreach ( $ param as $ key => $ value ) $ params [ ] = strtoupper ( trim ( $ key ) ) . "=" . $ value ; $ param = implode ( "," , $ params ) ; if ( $ param ) { $ param = " ;" . $ param ; if ( strlen ( $ param ) > 75 ) { $ rest = $ param ; $ param = "" ; while ( strlen ( $ rest ) > 75 ) { $ param .= substr ( $ rest , 0 , 74 ) . self :: $ lineBreak ; $ rest = " " . substr ( $ rest , 74 ) ; } } $ param = self :: $ lineBreak . $ param ; } $ content = ":" . $ content ; if ( strlen ( $ content ) > 75 ) { $ rest = $ content ; $ content = "" ; while ( strlen ( $ rest ) > 75 ) { $ content .= substr ( $ rest , 0 , 74 ) . self :: $ lineBreak ; $ rest = " " . substr ( $ rest , 74 ) ; } } $ line = strtoupper ( $ name ) . $ param . $ content ; $ line = $ line ; return $ line ; }
Builds iCal Line.
@access		protected
@static
@param		string		name		Line Name
@param		array		param		Line Parameters
@param		string		content		Line Value
@return 	string
Builds iCal Line .