PHP code example of yocto / yoclib-propertylist
1. Go to this page and download the library: Download yocto/yoclib-propertylist library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yocto / yoclib-propertylist example snippets
use YOCLIB\PropertyList\PropertyList;
$object = ['string_data',true,false];
$plist = new PropertyList;
$plist->setObject($object);
$xml = $plist->serialize(PropertyList::FORMAT_XML);
use YOCLIB\PropertyList\PropertyList;
$xml = '<plist xlmns="https://www.apple.com/DTDs/PropertyList-1.0.dtd" version="1.0"><array><string>string_data</string><true/><false/></array></plist>';
$plist = new PropertyList;
$plist->deserialize(PropertyList::FORMAT_XML,$xml);
$object = $plist->getObject();