Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
CFData Class Reference
Inheritance diagram for CFData:

Public Member Functions

 __construct ($value=null, $already_coded=false)
 Create new Data CFType.
 
 getCodedValue ()
 Get base64 encoded data.
 
 getValue ()
 Get the base64-decoded CFType's value.
 
 setValue ($value)
 Set the CFType's value and base64-encode it.
 
 toBinary (CFBinaryPropertyList &$bplist)
 convert value to binary representation
 
 toXML (DOMDocument $doc, $nodeName="")
 Get XML-Node.
 

Constructor & Destructor Documentation

◆ __construct()

CFData::__construct ( $value = null,
$already_coded = false )

Create new Data CFType.

Parameters
string$valuedata to be contained by new object
boolean$already_codedif true $value will not be base64-encoded, defaults to false

Member Function Documentation

◆ getCodedValue()

CFData::getCodedValue ( )

Get base64 encoded data.

Return values
stringThe base64 encoded data value

◆ getValue()

CFData::getValue ( )

Get the base64-decoded CFType's value.

Return values
mixedCFType's value

◆ setValue()

CFData::setValue ( $value)

Set the CFType's value and base64-encode it.

Note: looks like base64_encode has troubles with UTF-8 encoded strings

Return values
void

◆ toBinary()

CFData::toBinary ( CFBinaryPropertyList & $bplist)

convert value to binary representation

Parameters
CFBinaryPropertyListThe binary property list object
Return values
Theoffset in the object table

◆ toXML()

CFData::toXML ( DOMDocument $doc,
$nodeName = "" )

Get XML-Node.

Parameters
DOMDocument$docDOMDocument to create DOMNode in
string$nodeNameFor compatibility reasons; just ignore it
Return values
DOMNode<data>-Element

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