Skip to content

Commit 9be25c9

Browse files
committed
Examples, README
- moved example to examples folder, rename & code changes - updated README.md to include links, reflect directory changes, installation guide
1 parent cb95288 commit 9be25c9

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,14 @@ Output:
6161

6262
## Installation
6363

64-
You can install via Composer.
64+
### Easy installation
65+
You can install directly via [Composer](https://getcomposer.org/):
66+
```bash
67+
$ composer require suin/php-rss-writer
68+
```
6569

66-
At first create `composer.json` file:
70+
### Manual installation
71+
Add the following code to your `composer.json` file:
6772

6873
```json
6974
{
@@ -73,24 +78,23 @@ At first create `composer.json` file:
7378
}
7479
```
7580

76-
Run composer to install.
77-
78-
```
81+
...and run composer to install it:
82+
```bash
7983
$ composer install
8084
```
8185

82-
Finally, include `vendor/autoload.php` in your product.
83-
84-
```
86+
Finally, include `vendor/autoload.php` in your product:
87+
```php
88+
<?php
8589
require_once 'vendor/autoload.php';
8690
```
8791

88-
## How to Use
92+
## How to use
8993

90-
`example.php` is an example usage of RSSWriter.
94+
The [`examples`](examples) directory contains usage examples for RSSWriter.
9195

92-
If you want to know APIs, please see `FeedInterface`, `ChannelInterface` and `ItemInterface`.
96+
If you want to know APIs, please see [`FeedInterface`](src/Suin/RSSWriter/FeedInterface.php), [`ChannelInterface`](src/Suin/RSSWriter/ChannelInterface.php) and [`ItemInterface`](src/Suin/RSSWriter/ItemInterface.php).
9397

9498
## License
9599

96-
MIT license
100+
MIT license

example.php renamed to examples/simple-feed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
spl_autoload_register(function ($c) {
55
@include_once strtr($c, '\\_', '//') . '.php';
66
});
7-
set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/Source');
7+
set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/../src');
88

99
use Suin\RSSWriter\Channel;
1010
use Suin\RSSWriter\Feed;

0 commit comments

Comments
 (0)