ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilICalWriter Class Reference
+ Collaboration diagram for ilICalWriter:

Public Member Functions

 __construct ()
 addLine ($a_line)
 Add a line to the ical string.
 __toString ()
 Return ical string.

Static Public Member Functions

static escapeText ($a_text)

Data Fields

const LINEBREAK = "\r\n"
const LINE_SIZE = 75
const BEGIN_LINE_WHITESPACE = ' '

Private Attributes

 $ical = ''

Detailed Description

Definition at line 24 of file class.ilICalWriter.php.

Constructor & Destructor Documentation

ilICalWriter::__construct ( )

Definition at line 33 of file class.ilICalWriter.php.

{
$this->ical = '';
}

Member Function Documentation

ilICalWriter::__toString ( )

Return ical string.

Returns

Definition at line 94 of file class.ilICalWriter.php.

References $ical.

{
return $this->ical;
}
ilICalWriter::addLine (   $a_line)

Add a line to the ical string.

Returns
Parameters
object$a_line

Definition at line 62 of file class.ilICalWriter.php.

References BEGIN_LINE_WHITESPACE, LINEBREAK, ilStr\strLen(), and ilStr\subStr().

{
//$chunks = str_split($a_line, self::LINE_SIZE);
include_once './Services/Utilities/classes/class.ilStr.php';
// use multibyte split
$chunks = array();
$len = ilStr::strLen($a_line);
while($len)
{
$chunks[] = ilStr::subStr($a_line,0,self::LINE_SIZE);
$a_line = ilStr::subStr($a_line, self::LINE_SIZE, $len);
$len = ilStr::strLen($a_line);
}
for($i = 0; $i < count($chunks); $i++)
{
$this->ical .= $chunks[$i];
if(isset($chunks[$i+1]))
{
$this->ical .= self::LINEBREAK;
}
}
$this->ical .= self::LINEBREAK;
}

+ Here is the call graph for this function:

static ilICalWriter::escapeText (   $a_text)
static

Definition at line 38 of file class.ilICalWriter.php.

Referenced by ilCalendarExport\createVEVENT().

{
$a_text = str_replace("\r\n", '\\n', $a_text);
return preg_replace(
array(
'/\\\/',
'/;/',
'/,/',
),
array(
'\\',
'\;',
'\,',
),
$a_text
);
}

+ Here is the caller graph for this function:

Field Documentation

ilICalWriter::$ical = ''
private

Definition at line 31 of file class.ilICalWriter.php.

Referenced by __toString().

const ilICalWriter::BEGIN_LINE_WHITESPACE = ' '

Definition at line 29 of file class.ilICalWriter.php.

Referenced by addLine().

const ilICalWriter::LINE_SIZE = 75

Definition at line 28 of file class.ilICalWriter.php.

const ilICalWriter::LINEBREAK = "\r\n"

Definition at line 26 of file class.ilICalWriter.php.

Referenced by addLine().


The documentation for this class was generated from the following file: