From 2e270e00cec6ce430edea4520d54c5306626d9bd Mon Sep 17 00:00:00 2001 From: PierreLebedel Date: Sun, 3 Nov 2024 16:18:18 +0100 Subject: [PATCH] ex^port documentation --- README.md | 14 +++++++++----- docs/export.md | 24 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 docs/export.md diff --git a/README.md b/README.md index 7518094..4c2463b 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ composer require pleb/vcardio - [vCards collection](docs/collection.md) - [vCard builder](docs/builder.md) - [vCard object](docs/vcard.md) +- [Exporting files](docs/export.md) ## Usage @@ -229,17 +230,20 @@ END:VCARD The existing .vcf file will be overwritten. ```php -echo $vCard->export('./file/export/destination.vcf'); +$vCard->export('./file/export/destination.vcf'); ``` #### Export vCards collection -The existing .vcf can overwritten or appended. +The existing .vcf can be overwritten or appended. ```php -echo $vCardCollection->export('./file/export/destination.vcf', append:false); // OVERWRITTEN - -echo $vCardCollection->export('./file/export/destination.vcf', append:true); // APPENDED +// OVERWRITTEN +$vCardCollection->export('./file/export/destination.vcf', append:false); +``` +```php +// APPENDED +$vCardCollection->export('./file/export/destination.vcf', append:true); ``` ## Contribute diff --git a/docs/export.md b/docs/export.md new file mode 100644 index 0000000..f42b94a --- /dev/null +++ b/docs/export.md @@ -0,0 +1,24 @@ +[Documentation homepage](index.md) + +# Exporting files + +## vCards + +The existing .vcf file will be overwritten. + +```php +$vCard->export('./file/export/destination.vcf'); +``` + +## Collections + +The existing .vcf can be overwritten or appended. + +```php +// OVERWRITTEN +$vCardCollection->export('./file/export/destination.vcf', append:false); +``` +```php +// APPENDED +$vCardCollection->export('./file/export/destination.vcf', append:true); +```