1. Go to this page and download the library: Download mathieutu/exporter library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mathieutu / exporter example snippets
$object = new class
{
use \MathieuTu\Exporter\Exporter;
public $foo = 'testFoo';
private $bar = ['bar1' => 'testBar1', 'bar2' => 'testBar2', 'bar3' => 'testBar3'];
public $baz = [
(object) ['baz1' => 'baz1A', 'baz2' => 'baz2A', 'baz3' => 'baz3A'],
(object) ['baz1' => 'baz1B', 'baz2' => 'baz2B', 'baz3' => 'baz3B'],
(object) ['baz1' => 'baz1C', 'baz2' => 'baz2C', 'baz3' => 'baz3C'],
];
public function testWithParam(string $param): string
{
return 'test' . $param;
}
public function test(): string
{
return 'test' . date("l");
}
public function getBar(): array
{
return $this->bar;
}
};