* @author Christian Kruse * @copyright Copyright © 2018 Teclib * @package plist * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists * ------------------------------------------------------------------------------ */ namespace CFPropertyList; use \DOMDocument; use \Iterator; use \ArrayAccess; /** * String Type for CFPropertyList as defined by Apple. */ class CFString extends CFType { /** * Get XML-Node. * @param DOMDocument $doc DOMDocument to create DOMNode in * @param string $nodeName For compatibility reasons; just ignore it * @return DOMNode <string>-Element */ public function toXML(DOMDocument $doc, $nodeName = "") { return parent::toXML($doc, 'string'); } /** * convert value to binary representation * @param CFBinaryPropertyList The binary property list object * @return The offset in the object table */ public function toBinary(CFBinaryPropertyList &$bplist) { return $bplist->stringToBinary($this->value); } }