Skip to content

Commit

Permalink
Minor fix and PSR-4 add
Browse files Browse the repository at this point in the history
  • Loading branch information
itsalb3rt committed Sep 3, 2019
1 parent d542d18 commit b718038
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 60 deletions.
116 changes: 58 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,69 +15,69 @@ $ composer require ligne/xls-generator
**Para el ejemplo usaremos este array de 5 usuarios.**

```php
$array = array (
0 =>
array (
'id' => 1,
'name' => 'Leanne Graham',
'username' => 'Bret',
'email' => 'Sincere@april.biz',
'phone' => '1-770-736-8031 x56442',
'website' => 'hildegard.org',
),
1 =>
array (
'id' => 2,
'name' => 'Ervin Howell',
'username' => 'Antonette',
'email' => 'Shanna@melissa.tv',
'phone' => '010-692-6593 x09125',
'website' => 'anastasia.net',
),
2 =>
array (
'id' => 3,
'name' => 'Clementine Bauch',
'username' => 'Samantha',
'email' => 'Nathan@yesenia.net',
'phone' => '1-463-123-4447',
'website' => 'ramiro.info',
),
3 =>
array (
'id' => 4,
'name' => 'Patricia Lebsack',
'username' => 'Karianne',
'email' => 'Julianne.OConner@kory.org',
'phone' => '493-170-9623 x156',
'website' => 'kale.biz',
),
4 =>
array (
'id' => 5,
'name' => 'Chelsey Dietrich',
'username' => 'Kamren',
'email' => 'Lucio_Hettinger@annie.ca',
'phone' => '(254)954-1289',
'website' => 'demarco.info',
),
5 =>
array (
'id' => 6,
'name' => 'Mrs. Dennis Schulist',
'username' => 'Leopoldo_Corkery',
'email' => 'Karley_Dach@jasper.info',
'phone' => '1-477-935-8478 x6430',
'website' => 'ola.org',
)
);
$array = array(
0 =>
array(
'id' => 1,
'name' => 'Leanne Graham',
'username' => 'Bret',
'email' => 'Sincere@april.biz',
'phone' => '1-770-736-8031 x56442',
'website' => 'hildegard.org',
),
1 =>
array(
'id' => 2,
'name' => 'Ervin Howell',
'username' => 'Antonette',
'email' => 'Shanna@melissa.tv',
'phone' => '010-692-6593 x09125',
'website' => 'anastasia.net',
),
2 =>
array(
'id' => 3,
'name' => 'Clementine Bauch',
'username' => 'Samantha',
'email' => 'Nathan@yesenia.net',
'phone' => '1-463-123-4447',
'website' => 'ramiro.info',
),
3 =>
array(
'id' => 4,
'name' => 'Patricia Lebsack',
'username' => 'Karianne',
'email' => 'Julianne.OConner@kory.org',
'phone' => '493-170-9623 x156',
'website' => 'kale.biz',
),
4 =>
array(
'id' => 5,
'name' => 'Chelsey Dietrich',
'username' => 'Kamren',
'email' => 'Lucio_Hettinger@annie.ca',
'phone' => '(254)954-1289',
'website' => 'demarco.info',
),
5 =>
array(
'id' => 6,
'name' => 'Mrs. Dennis Schulist',
'username' => 'Leopoldo_Corkery',
'email' => 'Karley_Dach@jasper.info',
'phone' => '1-477-935-8478 x6430',
'website' => 'ola.org',
)
);
```

**Uso basico:**

```php
use Core\Util\XlsGenerator\XlsGenerator;

use Ligne\XlsGenerator;
//...
$xls = new XlsGenerator($array);
var_dump($xls->getXls());
```
Expand Down
9 changes: 8 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,12 @@
"email": "itsalb3rt@gmail.com"
}
],
"require": {}
"require": {
"php": ">=7.1"
},
"autoload": {
"psr-4": {
"Ligne\\": "src"
}
}
}
2 changes: 1 addition & 1 deletion src/XlsGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ private function downloadCsv(string $file_name = 'data'){
}
}

}
}

0 comments on commit b718038

Please sign in to comment.