Skip to content

Commit 8a5b9aa

Browse files
committed
add shortest example to the main page
1 parent dcec550 commit 8a5b9aa

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

index.md

+25-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,31 @@ The [common classes and exceptions](common) add logic that is not specific to
1919
The module specific implementations contain code that is specific to [the
2020
underlying PHP-module](php-modules).
2121

22-
## Usage documentation
22+
## TL;DR
23+
24+
Especially short explanation for people in a hurry.
25+
26+
Use `composer require` to add PHP/SAP to your project. Depending on the
27+
[PHP module](php-modules) you need to require a certain PHP/SAP composer
28+
package.
29+
30+
```php
31+
<?php
32+
use phpsap\saprfc\SapRfcConfigA;
33+
use phpsap\saprfc\SapRfcConnection;
34+
35+
$result = (new SapRfcConnection(new SapRfcConfigA([
36+
'ashost' => 'sap.example.com',
37+
'sysnr' => '001',
38+
'client' => '002',
39+
'user' => 'username',
40+
'passwd' => 'password'
41+
])))
42+
->prepareFunction('MY_COOL_SAP_REMOTE_FUNCTION')
43+
->invoke(['INPUT_PARAM' => 'value']);
44+
```
45+
46+
## Documentation
2347

2448
* [Usage overview](usage)
2549
- [Configure a connection](saprfc-config)

usage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Usage overview
22

33
Use `composer require` to add PHP/SAP to your project. Depending on the
4-
[PHP module](php-modules) you need to require a different PHP/SAP composer
4+
[PHP module](php-modules) you need to require a certain PHP/SAP composer
55
package.
66

77
The namespace of the library is `\phpsap\saprfc`.

0 commit comments

Comments
 (0)