diff --git a/examples/example-create-01.php b/examples/example-create-01.php index ec98219..3396d78 100644 --- a/examples/example-create-01.php +++ b/examples/example-create-01.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34,7 +27,7 @@ * ------------------------------------------------------------------------------ * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * ------------------------------------------------------------------------------ @@ -48,8 +41,8 @@ namespace CFPropertyList; // just in case... -error_reporting( E_ALL ); -ini_set( 'display_errors', 'on' ); +error_reporting(E_ALL); +ini_set('display_errors', 'on'); /** * Require CFPropertyList @@ -66,42 +59,40 @@ * Manuall Create the sample.xml.plist */ // the Root element of the PList is a Dictionary -$plist->add( $dict = new CFDictionary() ); +$plist->add($dict = new CFDictionary()); // Year Of Birth1965 -$dict->add( 'Year Of Birth', new CFNumber( 1965 ) ); +$dict->add('Year Of Birth', new CFNumber(1965)); // Date Of Graduation2004-06-22T19:23:43Z -$dict->add( 'Date Of Graduation', new CFDate( gmmktime( 19, 23, 43, 06, 22, 2004 ) ) ); +$dict->add('Date Of Graduation', new CFDate(gmmktime(19, 23, 43, 06, 22, 2004))); // Pets Names -$dict->add( 'Pets Names', new CFArray() ); +$dict->add('Pets Names', new CFArray()); // PicturePEKBpYGlmYFCPA== // to keep it simple we insert an already base64-encoded string -$dict->add( 'Picture', new CFData( 'PEKBpYGlmYFCPA==', true ) ); +$dict->add('Picture', new CFData('PEKBpYGlmYFCPA==', true)); // City Of BirthSpringfield -$dict->add( 'City Of Birth', new CFString( 'Springfield' ) ); +$dict->add('City Of Birth', new CFString('Springfield')); // NameJohn Doe -$dict->add( 'Name', new CFString( 'John Doe' ) ); +$dict->add('Name', new CFString('John Doe')); // Kids NamesJohnKyra -$dict->add( 'Kids Names', $array = new CFArray() ); -$array->add( new CFString( 'John' ) ); -$array->add( new CFString( 'Kyra' ) ); +$dict->add('Kids Names', $array = new CFArray()); +$array->add(new CFString('John')); +$array->add(new CFString('Kyra')); /* * Save PList as XML */ -$plist->saveXML( __DIR__.'/example-create-01.xml.plist' ); +$plist->saveXML(__DIR__.'/example-create-01.xml.plist'); /* * Save PList as Binary */ -$plist->saveBinary( __DIR__.'/example-create-01.binary.plist' ); - -?> \ No newline at end of file +$plist->saveBinary(__DIR__.'/example-create-01.binary.plist'); diff --git a/examples/example-create-02.php b/examples/example-create-02.php index f8adf39..fa35c9b 100644 --- a/examples/example-create-02.php +++ b/examples/example-create-02.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34,7 +27,7 @@ * ------------------------------------------------------------------------------ * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * ------------------------------------------------------------------------------ @@ -47,11 +40,13 @@ * @subpackage plist.examples */ namespace CFPropertyList; -use \DateTime, \DateTimeZone; + +use \DateTime; +use \DateTimeZone; // just in case... -error_reporting( E_ALL ); -ini_set( 'display_errors', 'on' ); +error_reporting(E_ALL); +ini_set('display_errors', 'on'); /** * Require CFPropertyList @@ -73,8 +68,8 @@ 'Year Of Birth' => 1965, // Note: dates cannot be guessed, so this will become a CFNumber and be treated as an integer // See example-04.php for a possible workaround - 'Date Of Graduation' => gmmktime( 19, 23, 43, 06, 22, 2004 ), - 'Date Of Birth' => new DateTime( '1984-09-07 08:15:23', new DateTimeZone( 'Europe/Berlin' ) ), + 'Date Of Graduation' => gmmktime(19, 23, 43, 06, 22, 2004), + 'Date Of Birth' => new DateTime('1984-09-07 08:15:23', new DateTimeZone('Europe/Berlin')), 'Pets Names' => array(), // Note: data cannot be guessed, so this will become a CFString // See example-03.php for a possible workaround @@ -85,18 +80,16 @@ ); $td = new CFTypeDetector(); -$guessedStructure = $td->toCFType( $structure ); -$plist->add( $guessedStructure ); +$guessedStructure = $td->toCFType($structure); +$plist->add($guessedStructure); /* * Save PList as XML */ -$plist->saveXML( __DIR__.'/example-create-02.xml.plist' ); +$plist->saveXML(__DIR__.'/example-create-02.xml.plist'); /* * Save PList as Binary */ -$plist->saveBinary( __DIR__.'/example-create-02.binary.plist' ); - -?> \ No newline at end of file +$plist->saveBinary(__DIR__.'/example-create-02.binary.plist'); diff --git a/examples/example-create-03.php b/examples/example-create-03.php index 57db762..283c43d 100644 --- a/examples/example-create-03.php +++ b/examples/example-create-03.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34,7 +27,7 @@ * ------------------------------------------------------------------------------ * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * ------------------------------------------------------------------------------ @@ -50,8 +43,8 @@ namespace CFPropertyList; // just in case... -error_reporting( E_ALL ); -ini_set( 'display_errors', 'on' ); +error_reporting(E_ALL); +ini_set('display_errors', 'on'); /** * Require CFPropertyList @@ -72,28 +65,26 @@ $structure = array( 'Year Of Birth' => 1965, // Note: dates cannot be guessed, it thus has to be specified explicitly - 'Date Of Graduation' => new CFDate( gmmktime( 19, 23, 43, 06, 22, 2004 ) ), + 'Date Of Graduation' => new CFDate(gmmktime(19, 23, 43, 06, 22, 2004)), 'Pets Names' => array(), // Note: data cannot be guessed, it thus has to be specified explicitly - 'Picture' => new CFData( 'PEKBpYGlmYFCPA==', true ), + 'Picture' => new CFData('PEKBpYGlmYFCPA==', true), 'City Of Birth' => 'Springfield', 'Name' => 'John Doe', 'Kids Names' => array( 'John', 'Kyra' ), ); $td = new CFTypeDetector(); -$guessedStructure = $td->toCFType( $structure ); -$plist->add( $guessedStructure ); +$guessedStructure = $td->toCFType($structure); +$plist->add($guessedStructure); /* * Save PList as XML */ -$plist->saveXML( __DIR__.'/example-create-03.xml.plist' ); +$plist->saveXML(__DIR__.'/example-create-03.xml.plist'); /* * Save PList as Binary */ -$plist->saveBinary( __DIR__.'/example-create-03.binary.plist' ); - -?> \ No newline at end of file +$plist->saveBinary(__DIR__.'/example-create-03.binary.plist'); diff --git a/examples/example-create-04.php b/examples/example-create-04.php index d94181f..245604b 100644 --- a/examples/example-create-04.php +++ b/examples/example-create-04.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34,7 +27,7 @@ * ------------------------------------------------------------------------------ * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * ------------------------------------------------------------------------------ @@ -49,24 +42,25 @@ namespace CFPropertyList; // just in case... -error_reporting( E_ALL ); -ini_set( 'display_errors', 'on' ); +error_reporting(E_ALL); +ini_set('display_errors', 'on'); /** * Require CFPropertyList */ require_once(__DIR__.'/../vendor/autoload.php'); -class DemoDetector extends CFTypeDetector { - - public function toCFType($value) { - if( $value instanceof PListException ) { - return new CFString( $value->getMessage() ); - } +class DemoDetector extends CFTypeDetector +{ - return parent::toCFType($value); - } + public function toCFType($value) + { + if ($value instanceof PListException) { + return new CFString($value->getMessage()); + } + return parent::toCFType($value); + } } /* @@ -89,45 +83,40 @@ public function toCFType($value) { * Try default detection */ try { - $plist = new CFPropertyList(); - $td = new CFTypeDetector(); - $guessedStructure = $td->toCFType( $structure ); - $plist->add( $guessedStructure ); - $plist->saveXML( __DIR__.'/example-create-04.xml.plist' ); - $plist->saveBinary( __DIR__.'/example-create-04.binary.plist' ); -} -catch( PListException $e ) { - echo 'Normal detection: ', $e->getMessage(), "\n"; + $plist = new CFPropertyList(); + $td = new CFTypeDetector(); + $guessedStructure = $td->toCFType($structure); + $plist->add($guessedStructure); + $plist->saveXML(__DIR__.'/example-create-04.xml.plist'); + $plist->saveBinary(__DIR__.'/example-create-04.binary.plist'); +} catch (PListException $e) { + echo 'Normal detection: ', $e->getMessage(), "\n"; } /* * Try detection by omitting exceptions */ try { - $plist = new CFPropertyList(); - $td = new CFTypeDetector( array('suppressExceptions' => true) ); - $guessedStructure = $td->toCFType( $structure ); - $plist->add( $guessedStructure ); - $plist->saveXML( __DIR__.'/example-create-04.xml.plist' ); - $plist->saveBinary( __DIR__.'/example-create-04.binary.plist' ); -} -catch( PListException $e ) { - echo 'Silent detection: ', $e->getMessage(), "\n"; + $plist = new CFPropertyList(); + $td = new CFTypeDetector(array('suppressExceptions' => true)); + $guessedStructure = $td->toCFType($structure); + $plist->add($guessedStructure); + $plist->saveXML(__DIR__.'/example-create-04.xml.plist'); + $plist->saveBinary(__DIR__.'/example-create-04.binary.plist'); +} catch (PListException $e) { + echo 'Silent detection: ', $e->getMessage(), "\n"; } /* * Try detection with an extended version of CFTypeDetector */ try { - $plist = new CFPropertyList(); - $td = new DemoDetector(); - $guessedStructure = $td->toCFType( $structure ); - $plist->add( $guessedStructure ); - $plist->saveXML( __DIR__.'/example-create-04.xml.plist' ); - $plist->saveBinary( __DIR__.'/example-create-04.binary.plist' ); + $plist = new CFPropertyList(); + $td = new DemoDetector(); + $guessedStructure = $td->toCFType($structure); + $plist->add($guessedStructure); + $plist->saveXML(__DIR__.'/example-create-04.xml.plist'); + $plist->saveBinary(__DIR__.'/example-create-04.binary.plist'); +} catch (PListException $e) { + echo 'User defined detection: ', $e->getMessage(), "\n"; } -catch( PListException $e ) { - echo 'User defined detection: ', $e->getMessage(), "\n"; -} - -?> \ No newline at end of file diff --git a/examples/example-modify-01.php b/examples/example-modify-01.php index f03ca74..0eb6f5f 100644 --- a/examples/example-modify-01.php +++ b/examples/example-modify-01.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34,7 +27,7 @@ * ------------------------------------------------------------------------------ * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * ------------------------------------------------------------------------------ @@ -49,8 +42,8 @@ namespace CFPropertyList; // just in case... -error_reporting( E_ALL ); -ini_set( 'display_errors', 'on' ); +error_reporting(E_ALL); +ini_set('display_errors', 'on'); /** * Require CFPropertyList @@ -59,24 +52,19 @@ // load an existing list -$plist = new CFPropertyList( __DIR__.'/sample.xml.plist' ); +$plist = new CFPropertyList(__DIR__.'/sample.xml.plist'); -foreach( $plist->getValue(true) as $key => $value ) -{ - if( $key == "City Of Birth" ) - { - $value->setValue( 'Mars' ); - } +foreach ($plist->getValue(true) as $key => $value) { + if ($key == "City Of Birth") { + $value->setValue('Mars'); + } - if( $value instanceof \Iterator ) - { - // The value is a CFDictionary or CFArray, you may continue down the tree - } + if ($value instanceof \Iterator) { + // The value is a CFDictionary or CFArray, you may continue down the tree + } } // save data -$plist->save( __DIR__.'/modified.plist', CFPropertyList::FORMAT_XML ); - -?> \ No newline at end of file +$plist->save(__DIR__.'/modified.plist', CFPropertyList::FORMAT_XML); diff --git a/examples/example-read-01.php b/examples/example-read-01.php index 38548a3..bb81917 100644 --- a/examples/example-read-01.php +++ b/examples/example-read-01.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34,7 +27,7 @@ * ------------------------------------------------------------------------------ * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * ------------------------------------------------------------------------------ @@ -49,8 +42,8 @@ namespace CFPropertyList; // just in case... -error_reporting( E_ALL ); -ini_set( 'display_errors', 'on' ); +error_reporting(E_ALL); +ini_set('display_errors', 'on'); /** * Require CFPropertyList @@ -62,14 +55,12 @@ * create a new CFPropertyList instance which loads the sample.plist on construct. * since we know it's an XML file, we can skip format-determination */ -$plist = new CFPropertyList( __DIR__.'/sample.xml.plist', CFPropertyList::FORMAT_XML ); +$plist = new CFPropertyList(__DIR__.'/sample.xml.plist', CFPropertyList::FORMAT_XML); /* * retrieve the array structure of sample.plist and dump to stdout */ echo '
';
-var_dump( $plist->toArray() );
+var_dump($plist->toArray());
 echo '
'; - -?> \ No newline at end of file diff --git a/examples/example-read-02.php b/examples/example-read-02.php index 957dc68..46dbf92 100644 --- a/examples/example-read-02.php +++ b/examples/example-read-02.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34,7 +27,7 @@ * ------------------------------------------------------------------------------ * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * ------------------------------------------------------------------------------ @@ -49,8 +42,8 @@ namespace CFPropertyList; // just in case... -error_reporting( E_ALL ); -ini_set( 'display_errors', 'on' ); +error_reporting(E_ALL); +ini_set('display_errors', 'on'); /** * Require CFPropertyList @@ -62,16 +55,14 @@ * create a new CFPropertyList instance which loads the sample.plist on construct. * since we know it's a binary file, we can skip format-determination */ -$plist = new CFPropertyList( __DIR__.'/sample.binary.plist', CFPropertyList::FORMAT_BINARY ); +$plist = new CFPropertyList(__DIR__.'/sample.binary.plist', CFPropertyList::FORMAT_BINARY); /* * retrieve the array structure of sample.plist and dump to stdout */ echo '
';
-var_dump( $plist->toArray() );
+var_dump($plist->toArray());
 echo '
'; -$plist->saveBinary( __DIR__.'/sample.binary.plist' ); - -?> \ No newline at end of file +$plist->saveBinary(__DIR__.'/sample.binary.plist'); diff --git a/examples/example-read-03.php b/examples/example-read-03.php index e11fd34..ea38b2f 100644 --- a/examples/example-read-03.php +++ b/examples/example-read-03.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34,7 +27,7 @@ * ------------------------------------------------------------------------------ * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * ------------------------------------------------------------------------------ @@ -49,8 +42,8 @@ namespace CFPropertyList; // just in case... -error_reporting( E_ALL ); -ini_set( 'display_errors', 'on' ); +error_reporting(E_ALL); +ini_set('display_errors', 'on'); /** * Require CFPropertyList @@ -62,16 +55,14 @@ * create a new CFPropertyList instance which loads the sample.plist on construct. * since we know the format, use the automatic format-detection */ -$plist = new CFPropertyList( __DIR__.'/sample.binary.plist' ); +$plist = new CFPropertyList(__DIR__.'/sample.binary.plist'); /* * retrieve the array structure of sample.plist and dump to stdout */ echo '
';
-var_dump( $plist->toArray() );
+var_dump($plist->toArray());
 echo '
'; -$plist->saveBinary( __DIR__.'/sample.binary.plist' ); - -?> \ No newline at end of file +$plist->saveBinary(__DIR__.'/sample.binary.plist'); diff --git a/examples/example-read-04.php b/examples/example-read-04.php index 47c0d9f..a51f292 100644 --- a/examples/example-read-04.php +++ b/examples/example-read-04.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34,7 +27,7 @@ * ------------------------------------------------------------------------------ * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * ------------------------------------------------------------------------------ @@ -49,8 +42,8 @@ namespace CFPropertyList; // just in case... -error_reporting( E_ALL ); -ini_set( 'display_errors', 'on' ); +error_reporting(E_ALL); +ini_set('display_errors', 'on'); /** * Require CFPropertyList @@ -71,7 +64,5 @@ */ echo '
';
-var_dump( $plist->toArray() );
+var_dump($plist->toArray());
 echo '
'; - -?> \ No newline at end of file diff --git a/examples/example-read-05.php b/examples/example-read-05.php index 86fae5f..d855062 100644 --- a/examples/example-read-05.php +++ b/examples/example-read-05.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34,7 +27,7 @@ * ------------------------------------------------------------------------------ * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * ------------------------------------------------------------------------------ @@ -49,8 +42,8 @@ namespace CFPropertyList; // just in case... -error_reporting( E_ALL ); -ini_set( 'display_errors', 'on' ); +error_reporting(E_ALL); +ini_set('display_errors', 'on'); /** * Require CFPropertyList @@ -71,7 +64,5 @@ */ echo '
';
-var_dump( $plist->toArray() );
+var_dump($plist->toArray());
 echo '
'; - -?> \ No newline at end of file diff --git a/examples/example-read-06.php b/examples/example-read-06.php index 051295b..2645df2 100644 --- a/examples/example-read-06.php +++ b/examples/example-read-06.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34,7 +27,7 @@ * ------------------------------------------------------------------------------ * @author Virtual Jasper * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * ------------------------------------------------------------------------------ diff --git a/src/CFPropertyList/CFArray.php b/src/CFPropertyList/CFArray.php index 6970ce8..7a37f4b 100644 --- a/src/CFPropertyList/CFArray.php +++ b/src/CFPropertyList/CFArray.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -35,7 +28,7 @@ * @author Rodney Rehm * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists diff --git a/src/CFPropertyList/CFBinaryPropertyList.php b/src/CFPropertyList/CFBinaryPropertyList.php index dd78b72..0b774a4 100644 --- a/src/CFPropertyList/CFBinaryPropertyList.php +++ b/src/CFPropertyList/CFBinaryPropertyList.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -35,7 +28,7 @@ * @author Rodney Rehm * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists diff --git a/src/CFPropertyList/CFBoolean.php b/src/CFPropertyList/CFBoolean.php index b5c6597..f61c4bb 100644 --- a/src/CFPropertyList/CFBoolean.php +++ b/src/CFPropertyList/CFBoolean.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -35,7 +28,7 @@ * @author Rodney Rehm * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists diff --git a/src/CFPropertyList/CFData.php b/src/CFPropertyList/CFData.php index 23c74b5..c0b4bb4 100644 --- a/src/CFPropertyList/CFData.php +++ b/src/CFPropertyList/CFData.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -35,7 +28,7 @@ * @author Rodney Rehm * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists diff --git a/src/CFPropertyList/CFDate.php b/src/CFPropertyList/CFDate.php index c174426..c81b6f0 100644 --- a/src/CFPropertyList/CFDate.php +++ b/src/CFPropertyList/CFDate.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -35,7 +28,7 @@ * @author Rodney Rehm * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists diff --git a/src/CFPropertyList/CFDictionary.php b/src/CFPropertyList/CFDictionary.php index 80aa487..94494de 100644 --- a/src/CFPropertyList/CFDictionary.php +++ b/src/CFPropertyList/CFDictionary.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -35,7 +28,7 @@ * @author Rodney Rehm * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists diff --git a/src/CFPropertyList/CFNumber.php b/src/CFPropertyList/CFNumber.php index f2b6518..de611c4 100644 --- a/src/CFPropertyList/CFNumber.php +++ b/src/CFPropertyList/CFNumber.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -35,7 +28,7 @@ * @author Rodney Rehm * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists diff --git a/src/CFPropertyList/CFPropertyList.php b/src/CFPropertyList/CFPropertyList.php index 68884f6..6ade6bc 100644 --- a/src/CFPropertyList/CFPropertyList.php +++ b/src/CFPropertyList/CFPropertyList.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -35,7 +28,7 @@ * @author Rodney Rehm * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists @@ -237,7 +230,9 @@ public function load($file = null, $format = null) case CFPropertyList::FORMAT_BINARY: $this->readBinary($file); break; - case CFPropertyList::FORMAT_AUTO: // what we now do is ugly, but neccessary to recognize the file format + + case CFPropertyList::FORMAT_AUTO: + // what we now do is ugly, but neccessary to recognize the file format $fd = fopen($file, "rb"); if (($magic_number = fread($fd, 8)) === false) { throw IOException::notReadable($file); @@ -256,8 +251,10 @@ public function load($file = null, $format = null) break; } $this->detectedFormat = CFPropertyList::FORMAT_XML; - // else: xml format, break not neccessary + // Fall back to CFPropertyList::FORMAT_XML + case CFPropertyList::FORMAT_XML: + // else: xml format, break not neccessary $doc = new DOMDocument(); $prevXmlErrors = libxml_use_internal_errors(true); libxml_clear_errors(); @@ -299,7 +296,9 @@ public function parse($str = null, $format = null) case CFPropertyList::FORMAT_BINARY: $this->parseBinary($str); break; - case CFPropertyList::FORMAT_AUTO: // what we now do is ugly, but neccessary to recognize the file format + + case CFPropertyList::FORMAT_AUTO: + // what we now do is ugly, but neccessary to recognize the file format if (($magic_number = substr($str, 0, 8)) === false) { throw IOException::notReadable(""); } @@ -316,8 +315,10 @@ public function parse($str = null, $format = null) break; } $this->detectedFormat = CFPropertyList::FORMAT_XML; - // else: xml format, break not neccessary + // no break: fallback to FORMAT_XML + case CFPropertyList::FORMAT_XML: + // else: xml format, break not neccessary $doc = new DOMDocument(); $prevXmlErrors = libxml_use_internal_errors(true); libxml_clear_errors(); @@ -348,13 +349,13 @@ protected function getLibxmlErrors() */ protected function import(DOMNode $node, $parent) { - // abort if there are no children + // abort if there are no children if (!$node->childNodes->length) { return; } foreach ($node->childNodes as $n) { - // skip if we can't handle the element + // skip if we can't handle the element if (!isset(self::$types[$n->nodeName])) { continue; } @@ -362,13 +363,13 @@ protected function import(DOMNode $node, $parent) $class = __NAMESPACE__ . '\\'.self::$types[$n->nodeName]; $key = null; - // find previous if possible + // find previous if possible $ps = $n->previousSibling; while ($ps && $ps->nodeName == '#text' && $ps->previousSibling) { $ps = $ps->previousSibling; } - // read if possible + // read if possible if ($ps && $ps->nodeName == 'key') { $key = $ps->firstChild->nodeValue; } @@ -409,11 +410,11 @@ protected function import(DOMNode $node, $parent) break; } - // Dictionaries need a key + // Dictionaries need a key if ($parent instanceof CFDictionary) { $parent->add($key, $value); - } // others don't - else { + } else { + // others don't $parent->add($value); } } diff --git a/src/CFPropertyList/CFString.php b/src/CFPropertyList/CFString.php index 74d98be..a1908b3 100644 --- a/src/CFPropertyList/CFString.php +++ b/src/CFPropertyList/CFString.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -35,7 +28,7 @@ * @author Rodney Rehm * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists diff --git a/src/CFPropertyList/CFType.php b/src/CFPropertyList/CFType.php index 2332dc6..00d275b 100644 --- a/src/CFPropertyList/CFType.php +++ b/src/CFPropertyList/CFType.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -35,7 +28,7 @@ * @author Rodney Rehm * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists diff --git a/src/CFPropertyList/CFTypeDetector.php b/src/CFPropertyList/CFTypeDetector.php index e3245b5..d62438b 100644 --- a/src/CFPropertyList/CFTypeDetector.php +++ b/src/CFPropertyList/CFTypeDetector.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -35,7 +28,7 @@ * @author Rodney Rehm * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists diff --git a/src/CFPropertyList/CFUid.php b/src/CFPropertyList/CFUid.php index ce02b15..f88586a 100644 --- a/src/CFPropertyList/CFUid.php +++ b/src/CFPropertyList/CFUid.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -35,7 +28,7 @@ * @author Rodney Rehm * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists diff --git a/src/CFPropertyList/IOException.php b/src/CFPropertyList/IOException.php index f052ed1..043a344 100644 --- a/src/CFPropertyList/IOException.php +++ b/src/CFPropertyList/IOException.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -35,7 +28,7 @@ * @author Rodney Rehm * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists diff --git a/src/CFPropertyList/PListException.php b/src/CFPropertyList/PListException.php index d234a6f..62fe61a 100644 --- a/src/CFPropertyList/PListException.php +++ b/src/CFPropertyList/PListException.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -35,7 +28,7 @@ * @author Rodney Rehm * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists diff --git a/tests/BinaryParseTest.php b/tests/BinaryParseTest.php index 5c77326..7e586da 100644 --- a/tests/BinaryParseTest.php +++ b/tests/BinaryParseTest.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34,7 +27,7 @@ * ------------------------------------------------------------------------------ * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists diff --git a/tests/EmptyElementsTest.php b/tests/EmptyElementsTest.php index 76e4201..cc7c34c 100644 --- a/tests/EmptyElementsTest.php +++ b/tests/EmptyElementsTest.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34,7 +27,7 @@ * ------------------------------------------------------------------------------ * @author maciej.majewski * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists diff --git a/tests/ParseXMLTest.php b/tests/ParseXMLTest.php index 54f1d42..8aa09ba 100644 --- a/tests/ParseXMLTest.php +++ b/tests/ParseXMLTest.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34,7 +27,7 @@ * ------------------------------------------------------------------------------ * @author Christian Kruse * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * ------------------------------------------------------------------------------ diff --git a/tests/WriteBinaryTest.php b/tests/WriteBinaryTest.php index 6d454b1..21d54e9 100644 --- a/tests/WriteBinaryTest.php +++ b/tests/WriteBinaryTest.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34,7 +27,7 @@ * ------------------------------------------------------------------------------ * @author Jocelyn Badgley * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists diff --git a/tests/WriteXMLTest.php b/tests/WriteXMLTest.php index 66d108b..6d5e970 100644 --- a/tests/WriteXMLTest.php +++ b/tests/WriteXMLTest.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -34,7 +27,7 @@ * ------------------------------------------------------------------------------ * @author Jocelyn Badgley * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists diff --git a/tests/bootstrap.php b/tests/bootstrap.php index c001a1c..42a9f22 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -4,13 +4,6 @@ * * This file is part of CFPropertyList. * - * The PHP implementation of Apple's PropertyList can handle XML PropertyLists - * as well as binary PropertyLists. It offers functionality to easily convert - * data between worlds, e.g. recalculating timestamps from unix epoch to apple - * epoch and vice versa. A feature to automagically create (guess) the plist - * structure from a normal PHP data structure will help you dump your data to - * plist in no time. - * * Copyright (c) 2018 Teclib' * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -36,7 +29,7 @@ * @author Christian Kruse * @author Thierry Bugier * @copyright Copyright © 2018 Teclib - * @package plist + * @package CFPropertyList * @license MIT * @link https://github.com/TECLIB/CFPropertyList/ * @link http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/plist.5.html Property Lists