PHPackages                             vegas-cmf/exporter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. vegas-cmf/exporter

AbandonedArchivedLibrary

vegas-cmf/exporter
==================

Vegas CMF Exporter

v1.0.2(11y ago)41404MITPHPPHP &gt;=5.4

Since Aug 13Pushed 10y ago3 watchersCompare

[ Source](https://github.com/vegas-cmf/exporter)[ Packagist](https://packagist.org/packages/vegas-cmf/exporter)[ RSS](/packages/vegas-cmf-exporter/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (7)Versions (6)Used By (0)

Vegas CMF Exporter
==================

[](#vegas-cmf-exporter)

[![Build Status](https://camo.githubusercontent.com/07446b35f028ce8c69665b0fdb3fd0b48fdd04e7e6fbf0fba68b8bc23e93c1e5/68747470733a2f2f7472617669732d63692e6f72672f76656761732d636d662f6578706f727465722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/vegas-cmf/exporter)[![Coverage Status](https://camo.githubusercontent.com/36386b8cff860db03b294a8d2b33333f36e162453ffb918f3d74edf33e14b80a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f76656761732d636d662f6578706f727465722f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/vegas-cmf/exporter?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/d9605cd86134c192e3c1bff6fbbc789fa5504872b145f8133f99b977be356ba7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76656761732d636d662f6578706f727465722e737667)](https://packagist.org/packages/vegas-cmf/exporter)[![Total Downloads](https://camo.githubusercontent.com/8c0c2ab84f8942c2fb1a5d4f605e1b80d738b43c2580538c75f413bab04a06b6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f76656761732d636d662f6578706f727465722e737667)](https://packagist.org/packages/vegas-cmf/exporter)

Exporter allows user to get table output in one of following ways:

- store into file
- download file in a browser
- raw string buffer

Currently, the library supports following formats:

- CSV
- PDF
- XLS (Excel 2007)
- XML

**Installation**

Set `\Vegas\Exporter\Exporter` class as a service by adding following snippet into your `services` directory:

```
use Phalcon\DiInterface;
use Vegas\DI\ServiceProviderInterface;

/**
 * Class ExporterServiceProvider
 */
class ExporterServiceProvider implements ServiceProviderInterface
{
    const SERVICE_NAME = 'exporter';

    /**
     * {@inheritdoc}
     */
    public function register(DiInterface $di)
    {
        $di->set(self::SERVICE_NAME, function() use ($di) {
            $exporter = new \Vegas\Exporter\Exporter;
            return $exporter->setDI($di);
        }, true);
    }

    public function getDependencies()
    {
        return [];
    }
}
```

**Saving usage:**

```
$exportData = [
    ["John", "Malkovic", "52"],
    ["Kenny", "Smith", "36"],
    ["Sam", "Stevenson", "18"],
];

$columns = ["Firstname", "Lastname", "age"];

$extraSettings = [  // CSV-only settings, default values below
    'separator'     => ',',
    'lineSeparator' => PHP_EOL,
    'skipHeaders'   => false,   // skip printing headers in first row?
    'quoteFields'   => false    // enclose output fields in ""
];

$config = (new \Vegas\Exporter\ExportSettings)
            ->setFilename('my_export_file')
            ->setOutputDir('/tmp')
            ->setHeaders($columns)
            ->setHeaderKeysAsParams(true)
            ->setData($exportData)
            ->setExtraSettings($extraSettings);

/** @var \Phalcon\DiInterface $di */
$exporter = $di->get('exporter');

$exporter->setConfig($config);
$exporter->saveCsv();
```

This will store our data in CSV format into file `/tmp/my_export_file.csv`.

**Downloading usage:**

```
$exportData = [
    ["John", "Malkovic", "52"],
    ["Kenny", "Smith", "36"],
    ["Sam", "Stevenson", "18"],
];

$columns = ["Firstname", "Lastname", "age"];

$extraSettings = [  // PDF-only settings, default values below
    'pageOrientation'       => 'Portrait',
    'pageSize'              => 'A4',
    'fontSize'              => 0,
    'fontFamily'            => ''
];

$config = (new \Vegas\Exporter\ExportSettings)
            ->setTemplate('template_name')
            ->setTitle('My first PDF export')
            ->setFilename('my_export_file')
            ->setHeaders($columns)
            ->setData($exportData)
            ->setExtraSettings($extraSettings);

/** @var \Phalcon\DiInterface $di */
$exporter = $di->get('exporter');

$di->get('view')->disable();    // prevent default view rendering
$exporter->setConfig($config);
$exporter->downloadPdf();
```

This will download a PDF file named `my_export_file.pdf` in a browser.

Note that PDF format requires a `template_name` partial in the modules view directory to render output properly.

**Printing usage:**

```
$john = new \stdClass;
$john->Firstname = 'John';
$john->Lastname = 'Malkovic';
$john->age = 52;

$exportData = [
    $john,
    // ...
];

$columns = ["Firstname", "Lastname", "age"];

$extraSettings = [  // XML-only settings, default values below
    'rootName'  => 'root',  // document tree tag name
    'nodeName'  => 'item'   // each node tag name
];

$config = (new \Vegas\Exporter\ExportSettings)
            ->setHeaders($columns)
            ->setHeaderKeysAsParams(false)
            ->setData($exportData)
            ->setExtraSettings($extraSettings);

/** @var \Phalcon\DiInterface $di */
$exporter = $di->get('exporter');

$exporter->setConfig($config);
$result = $exporter->printXml();
```

This will assign pretty printed XML string to `$result`. As presented, exporter accepts object array input as well.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 52.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~52 days

Total

5

Last Release

4078d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48bf631edf58dd900709093af96ad59b7b40c1b3e32b2d4406591309a1d07db4?d=identicon)[vegas](/maintainers/vegas)

---

Top Contributors

[![maniolek](https://avatars.githubusercontent.com/u/3389670?v=4)](https://github.com/maniolek "maniolek (37 commits)")[![archdevil666pl](https://avatars.githubusercontent.com/u/2486875?v=4)](https://github.com/archdevil666pl "archdevil666pl (18 commits)")[![arius86](https://avatars.githubusercontent.com/u/1889755?v=4)](https://github.com/arius86 "arius86 (10 commits)")[![szytko](https://avatars.githubusercontent.com/u/300085?v=4)](https://github.com/szytko "szytko (3 commits)")[![adrianmalik](https://avatars.githubusercontent.com/u/6972502?v=4)](https://github.com/adrianmalik "adrianmalik (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vegas-cmf-exporter/health.svg)

```
[![Health](https://phpackages.com/badges/vegas-cmf-exporter/health.svg)](https://phpackages.com/packages/vegas-cmf-exporter)
```

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[krayin/laravel-crm

Krayin CRM

22.0k32.8k1](/packages/krayin-laravel-crm)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1714.8k8](/packages/2lenet-crudit-bundle)[voidagency/vactory_starter_kit

Vactory is a custom Drupal profile which is developed and released by VOID Agency.

1019.7k](/packages/voidagency-vactory-starter-kit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
