Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Riimu committed Jul 15, 2017
1 parent 24ec56e commit 2b9f489
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 27 deletions.
56 changes: 30 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,47 +24,51 @@ The API documentation is available at: http://kit.riimu.net/api/pathjoin/

## Requirements ##

In order to use this library, the following requirements must be met:

* PHP version 5.6
* The minimum supported PHP version is 5.6

## Installation ##

This library can be installed by using [Composer](http://getcomposer.org/). In
order to do this, you must download the latest Composer version and run the
`require` command to add this library as a dependency to your project. The
easiest way to complete these two tasks is to run the following two commands
in your terminal:
### Installation with Composer ###

```
php -r "readfile('https://getcomposer.org/installer');" | php
php composer.phar require "riimu/kit-pathjoin:1.*"
```
The easiest way to install this library is to use Composer to handle your
dependencies. In order to install this library via Composer, simply follow
these two steps:

1. Acquire the `composer.phar` by running the Composer
[Command-line installation](https://getcomposer.org/download/)
in your project root.

If you already have Composer installed on your system and you know how to use
it, you can also install this library by adding it as a dependency to your
`composer.json` file and running the `composer install` command. Here is an
example of what your `composer.json` file could look like:
2. Once you have run the installation script, you should have the `composer.phar`
file in you project root and you can run the following command:

```
php composer.phar require "riimu/kit-pathjoin:^1.2"
```

After installing this library via Composer, you can load the library by
including the `vendor/autoload.php` file that was generated by Composer during
the installation.

### Adding the library as a dependency ###

If you are already familiar with how to use Composer, you may alternatively add
the library as a dependency by adding the following `composer.json` file to your
project and running the `composer install` command:

```json
{
"require": {
"riimu/kit-pathjoin": "1.*"
"riimu/kit-pathjoin": "^1.2"
}
}
```

After installing this library via Composer, you can load the library by
including the `vendor/autoload.php` file that was generated by Composer during
the installation.

### Manual installation ###

You can also install this library manually without using Composer. In order to
do this, you must download the [latest release](https://github.com/Riimu/Kit-PathJoin/releases/latest)
and extract the `src` folder from the archive to your project folder. To load
the library, you can simply include the `src/autoload.php` file that was
provided in the archive.
If you do not wish to use Composer to load the library, you may also download
the library manually by downloading the [latest release](https://github.com/Riimu/Kit-PathJoin/releases/latest)
and extracting the `src` folder to your project. You may then include the
provided `src/autoload.php` file to load the library classes.

## Usage ##

Expand Down
2 changes: 1 addition & 1 deletion examples/example.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require '../src/autoload.php';
require __DIR__ . '/../vendor/autoload.php';
use Riimu\Kit\PathJoin\Path;

// Both of the following will output 'foo/bar' on Unix and 'foo\bar' on Windows
Expand Down

0 comments on commit 2b9f489

Please sign in to comment.