Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
CFArray Class Reference

Array Type of CFPropertyList. More...

Inheritance diagram for CFArray:

Public Member Functions

 __construct ($value=array())
 Create new CFType.
 
 add (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 {.
 
 offsetExists ($offset)
 Determine if the array's key exists.
 
 offsetGet ($offset)
 Fetch a specific key from the CFArray.
 
 offsetSet ($offset, $value)
 Set a value in the array.
 
 offsetUnset ($offset)
 Unsets a value in the array Note: this dummy does nothing.
 
 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

integer $iteratorPosition = 0
 Position of iterator
 

Detailed Description

Array Type of CFPropertyList.

Constructor & Destructor Documentation

◆ __construct()

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

Create new CFType.

Parameters
array$valueValue of CFType

Member Function Documentation

◆ add()

CFArray::add ( CFType $value = null)

Add CFType to collection.

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

◆ current()

CFArray::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

◆ del()

CFArray::del ( $key)

Remove CFType from collection.

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

◆ get()

CFArray::get ( $key)

Get CFType from collection.

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

◆ key()

CFArray::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: mixed @uses $iteratorPosition identify current key

◆ next()

CFArray::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

◆ offsetExists()

CFArray::offsetExists ( $offset)

Determine if the array's key exists.

Parameters
string$offsetthe key to check
Return values
booltrue if the offset exists, false if not @externalurl http://php.net/manual/en/arrayaccess.offsetexists.php @uses $value to check if $key exists
Author
Sean Coates sean@.nosp@m.php..nosp@m.net

◆ offsetGet()

CFArray::offsetGet ( $offset)

Fetch a specific key from the CFArray.

Parameters
mixed$offsetthe key to check
Return values
mixedthe value associated with the key; null if the key is not found @externalurl http://php.net/manual/en/arrayaccess.offsetget.php @uses get() to get the key's value
Author
Sean Coates sean@.nosp@m.php..nosp@m.net

◆ offsetSet()

CFArray::offsetSet ( $offset,
$value )

Set a value in the array.

Parameters
mixed$offsetthe key to set
mixed$valuethe value to set
Return values
void@externalurl http://php.net/manual/en/arrayaccess.offsetset.php @uses setValue() to set the key's new value
Author
Sean Coates sean@.nosp@m.php..nosp@m.net

◆ offsetUnset()

CFArray::offsetUnset ( $offset)

Unsets a value in the array Note: this dummy does nothing.

Parameters
mixed$offsetthe key to set
Return values
void@externalurl http://php.net/manual/en/arrayaccess.offsetunset.php
Author
Sean Coates sean@.nosp@m.php..nosp@m.net

◆ rewind()

CFArray::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

◆ setValue()

CFArray::setValue ( $value)

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

Return values
void

◆ toArray()

CFArray::toArray ( )

Get CFType's value.

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

◆ toBinary()

CFArray::toBinary ( CFBinaryPropertyList & $bplist)

convert value to binary representation

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

◆ toXML()

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

Get XML-Node.

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

◆ valid()

CFArray::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: