فهرست منبع

:octocat: docfix

smiley 8 سال پیش
والد
کامیت
136e581b0c
1فایلهای تغییر یافته به همراه14 افزوده شده و 12 حذف شده
  1. 14 12
      README.md

+ 14 - 12
README.md

@@ -148,18 +148,6 @@ foreach($matrix as $row){
 
 ```
 
-### Authenticator example
-
-[codemasher/php-googleauth](https://github.com/codemasher/php-googleauth) features creation of `otpauth://` URIs for use with most mobile authenticators:
-```php
-use chillerlan\GoogleAuth\Authenticator;
-
-$authenticator = new Authenticator;
-
-$data   = $authenticator->getUri($authenticator->createSecret(), 'test', 'chillerlan.net');
-$qrcode = new QRCode($data, new QRImage);
-```
-
 ### Custom output modules
 But then again, instead of bloating your own code, you can simply create your own output module by extending `QROutputAbstract`.
 ```php
@@ -201,6 +189,20 @@ class MyCustomOutput extends QROutputAbstract{
 }
 ```
 
+### Authenticator example
+
+[codemasher/php-googleauth](https://github.com/codemasher/php-googleauth) features creation of `otpauth://` URIs for use with most mobile authenticators:
+```php
+use chillerlan\GoogleAuth\Authenticator;
+
+$authenticator = new Authenticator;
+
+$secret = $authenticator->createSecret(); // -> userdata
+$data   = $authenticator->getUri($secret, 'test', 'chillerlan.net');
+
+$qrcode->setData($data)->output();
+```
+
 ###  `QRCode` public methods
 method | return 
 ------ | ------