Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
CFDictionary Class Reference

Array Type of CFPropertyList. More...

Inheritance diagram for CFDictionary:

Public Member Functions

 __construct ($value=array())
 Create new CFType.
 
 __get ($key)
 Generic getter (magic)
 
 add ($key, CFType $value=null)
 Add CFType to collection.
 
 current ()
 Get Iterator's current CFType identified by $iteratorPosition @externalurl http://php.net/manual/en/iterator.current.php.
 
 del ($key)
 Remove CFType from collection.
 
 get ($key)
 Get CFType from collection.
 
 key ()
 Get Iterator's current key identified by $iteratorPosition @externalurl http://php.net/manual/en/iterator.key.php.
 
 next ()
 Increment $iteratorPosition to address next {.
 
 rewind ()
 Rewind $iteratorPosition to first position (being 0) @externalurl http://php.net/manual/en/iterator.rewind.php.
 
 setValue ($value)
 Set the CFType's value Note: this dummy does nothing.
 
 toArray ()
 Get CFType's value.
 
 toBinary (CFBinaryPropertyList &$bplist)
 convert value to binary representation
 
 toXML (DOMDocument $doc, $nodeName="")
 Get XML-Node.
 
 valid ()
 Test if $iteratorPosition addresses a valid element of $value @externalurl http://php.net/manual/en/iterator.valid.php.
 

Protected Attributes

array $iteratorKeys = null
 List of Keys for numerical iterator access
 
integer $iteratorPosition = 0
 Position of iterator
 

Detailed Description

Array Type of CFPropertyList.

Constructor & Destructor Documentation

◆ __construct()

CFDictionary::__construct ( $value = array())

Create new CFType.

Parameters
array$valueValue of CFType

Member Function Documentation

◆ __get()

CFDictionary::__get ( $key)

Generic getter (magic)

Parameters
integer$keyKey of CFType to retrieve from collection
Return values
CFTypeCFType found at $key, null else @externalurl http://php.net/oop5.overloading @uses get() to retrieve the key's value
Author
Sean Coates sean@.nosp@m.php..nosp@m.net

◆ add()

CFDictionary::add ( $key,
CFType $value = null )

Add CFType to collection.

Parameters
string$keyKey to add to collection
CFType$valueCFType to add to collection, defaults to null which results in an empty CFString
Return values
void@uses $value for adding $key $value pair

◆ current()

CFDictionary::current ( )

Get Iterator's current CFType identified by $iteratorPosition @externalurl http://php.net/manual/en/iterator.current.php.

Return values
mixedcurrent Item @uses $iteratorPosition identify current key @uses $iteratorKeys identify current value

◆ del()

CFDictionary::del ( $key)

Remove CFType from collection.

Parameters
string$keyKey of CFType to removes from collection
Return values
CFTyperemoved CFType, null else @uses $value for removing CFType of $key

◆ get()

CFDictionary::get ( $key)

Get CFType from collection.

Parameters
string$keyKey of CFType to retrieve from collection
Return values
CFTypeCFType found at $key, null else @uses $value for retrieving CFType of $key

◆ key()

CFDictionary::key ( )

Get Iterator's current key identified by $iteratorPosition @externalurl http://php.net/manual/en/iterator.key.php.

Return values
mixedkey of the current Item @uses $iteratorPosition identify current key @uses $iteratorKeys identify current value

◆ next()

CFDictionary::next ( )

Increment $iteratorPosition to address next {.

See also
CFType} @externalurl http://php.net/manual/en/iterator.next.php
Return values
void@uses $iteratorPosition increment by 1

◆ rewind()

CFDictionary::rewind ( )

Rewind $iteratorPosition to first position (being 0) @externalurl http://php.net/manual/en/iterator.rewind.php.

Return values
void@uses $iteratorPosition set to 0 @uses $iteratorKeys store keys of $value

◆ setValue()

CFDictionary::setValue ( $value)

Set the CFType's value Note: this dummy does nothing.

Return values
void

◆ toArray()

CFDictionary::toArray ( )

Get CFType's value.

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

◆ toBinary()

CFDictionary::toBinary ( CFBinaryPropertyList & $bplist)

convert value to binary representation

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

◆ toXML()

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

Get XML-Node.

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

◆ valid()

CFDictionary::valid ( )

Test if $iteratorPosition addresses a valid element of $value @externalurl http://php.net/manual/en/iterator.valid.php.

Return values
booltrue if current position is valid, false else @uses $iteratorPosition test if within $iteratorKeys @uses $iteratorPosition test if within $value

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