Moodle PHP Documentation 4.4
Moodle 4.4.8+ (Build: 20250530) (000b0c27711)
CFData Class Reference
Inheritance diagram for CFData:
CFType

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.
 
 toArray ()
 Get CFType's value.
 
 toBinary (CFBinaryPropertyList &$bplist)
 convert value to binary representation
 
 toXML (DOMDocument $doc, $nodeName="")
 Get XML-Node.
 

Protected Attributes

array $value = null
 CFType nodes.
 

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

Reimplemented from CFType.

◆ 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

Reimplemented from CFType.

◆ toArray()

CFType::toArray ( )
inherited

Get CFType's value.

Return values
mixedprimitive value @uses $value for retrieving primitive of CFType

Reimplemented in CFArray, and CFDictionary.

◆ toBinary()

CFData::toBinary ( CFBinaryPropertyList & $bplist)

convert value to binary representation

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

Reimplemented from CFType.

◆ 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

Reimplemented from CFType.


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