Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]

LICENSE This file is part of CFPropertyList.

Author: Rodney Rehm <rodney.rehm@medialize.de>
Author: Christian Kruse <cjk@wwwtech.de>
Copyright: Copyright © 2018 Teclib
License: MIT
File Size: 285 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

CFArray:: (17 methods):
  __construct()
  setValue()
  add()
  get()
  del()
  toXML()
  toBinary()
  toArray()
  rewind()
  current()
  key()
  next()
  valid()
  offsetExists()
  offsetGet()
  offsetSet()
  offsetUnset()


Class: CFArray  - X-Ref

Array Type of CFPropertyList

__construct($value = array()   X-Ref
Create new CFType.

param: array $value Value of CFType

setValue($value)   X-Ref
Set the CFType's value
<b>Note:</b> this dummy does nothing

return: void

add(CFType $value = null)   X-Ref
Add CFType to collection.

return: void
param: CFType $value CFType to add to collection, defaults to null which results in an empty {@link CFString}

get($key)   X-Ref
Get CFType from collection.

return: CFType CFType found at $key, null else
param: integer $key Key of CFType to retrieve from collection

del($key)   X-Ref
Remove CFType from collection.

return: CFType removed CFType, null else
param: integer $key Key of CFType to removes from collection

toXML(DOMDocument $doc, $nodeName = "")   X-Ref
Get XML-Node.

return: DOMNode &lt;array&gt;-Element
param: DOMDocument $doc DOMDocument to create DOMNode in
param: string $nodeName For compatibility reasons; just ignore it

toBinary(CFBinaryPropertyList &$bplist)   X-Ref
convert value to binary representation

return: The offset in the object table
param: CFBinaryPropertyList The binary property list object

toArray()   X-Ref
Get CFType's value.

return: array primitive value

rewind()   X-Ref
Rewind {@link $iteratorPosition} to first position (being 0)

return: void

current()   X-Ref
Get Iterator's current {@link CFType} identified by {@link $iteratorPosition}

return: CFType current Item

key()   X-Ref
Get Iterator's current key identified by {@link $iteratorPosition}

return: string key of the current Item

next()   X-Ref
Increment {@link $iteratorPosition} to address next {@see CFType}

return: void

valid()   X-Ref
Test if {@link $iteratorPosition} addresses a valid element of {@link $value}

return: boolean true if current position is valid, false else

offsetExists($key)   X-Ref
Determine if the array's key exists

author: Sean Coates <sean@php.net>
return: bool true if the offset exists, false if not
param: string $key the key to check

offsetGet($key)   X-Ref
Fetch a specific key from the CFArray

author: Sean Coates <sean@php.net>
return: mixed the value associated with the key; null if the key is not found
param: string $key the key to check

offsetSet($key, $value)   X-Ref
Set a value in the array

author: Sean Coates <sean@php.net>
return: void
param: string $key the key to set
param: string $value the value to set

offsetUnset($key)   X-Ref
Unsets a value in the array
<b>Note:</b> this dummy does nothing

author: Sean Coates <sean@php.net>
return: void
param: string $key the key to set