/**
  * Decode the given data from plist format
  *
  * @param string $data
  *            data sent from client to
  *            the api in the given format.
  *
  * @return array associative array of the parsed data
  */
 public function decode($data)
 {
     //require_once 'CFPropertyList.php';
     $plist = new CFPropertyList();
     $plist->parse($data);
     return $plist->toArray();
 }
Exemplo n.º 2
0
 /**
  * Decode the given data from plist format
  *
  * @param string $data
  *            data sent from client to
  *            the api in the given format.
  *
  * @return array associative array of the parsed data
  */
 public function decode($data)
 {
     $plist = new CFPropertyList();
     $plist->parse($data);
     return $plist->toArray();
 }
Exemplo n.º 3
0
 /**
  * @param string $path
  * @return mixed
  * @throws IOException
  * @throws PListException
  * @throws DOMException
  */
 public function parseFromFile($path)
 {
     $content = file_get_contents($path);
     $this->plist->parse($content);
     return $this->plist->toArray();
 }