From 345a7d61cfaeef91a0e62824cba7b4e31fb3c4c5 Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Mon, 3 Jun 2019 11:46:54 +0200 Subject: [PATCH] Created 1. Getting Started (markdown) --- 1.-Getting-Started.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 1.-Getting-Started.md diff --git a/1.-Getting-Started.md b/1.-Getting-Started.md new file mode 100644 index 0000000..9e69970 --- /dev/null +++ b/1.-Getting-Started.md @@ -0,0 +1,33 @@ +# Getting started + +## Installing Libpairtwo +You can easily start using libpairtwo by installing it via composer + +```bash +$ composer install JeroenED/libpairtwo +``` + +In you initialization code add the vendor/autoload.php +```php +require_once("vendor/autoload.php"); +``` + +## Reading out a pairing-file +Reading out a pairing-file is very simple. First create a reader. This is simply done by using the IOFactory::createReader() method. Then call the `read` method of the return value of the `IOFactory::createReader()` method. + +```php +require_once("vendor/autoload.php"); +use JeroenED/Libpairtwo/IOFactory; + +$filereader = IOFactory::createReader('Pairtwo-6'); +$filereader->read('mycompetition.sws'); +``` +This will return a usable object for reaching out for results, rankings, etc. + +## Getting methods of the class +I didn't want to add the generated phpdoc in this library simply because it is generated. + +The command to generate it yourself is just `$ phpdoc`. This will generate the docs in the doc/api folder. + +## Examples +You can find several exampl \ No newline at end of file