2017 © Pedro PelĂĄez
 

library zend-view-csvstrategy

CSV View strategy for the zend-view lib

image

legow/zend-view-csvstrategy

CSV View strategy for the zend-view lib

  • Monday, July 23, 2018
  • by adamturcsan
  • Repository
  • 1 Watchers
  • 0 Stars
  • 81 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 13 % Grown

The README.md

Build Status Coverage Status, (*1)

zend-view-csvstrategy

CsvStrategy extension for zendframework/zend-view, (*2)

How It Works?

  1. Configure the CsvStrategy to the ViewManager in module.config.php, (*3)

        <?php 
    
        return [
            'view_manager' => [
                'template_path_stack' => [
                    __DIR__ . '/../view',
                ],
                'template_map' => [
                    'export/csv' => __DIR__.'/../view/refuels/index/export.pcsv'
                ],
                'strategies' => [
                    View\Strategy\CsvStrategy::class
                ]
            ]
        ]
    
  2. Create csv view file as export.pcsv, (*4)

        <?php 
    
        foreach($this->data as $row) {
            echo implode($row, ';').PHP_EOL;
        }
    
  3. Use it in controller actions, (*5)

        <?php
    
        namespace Test;
    
        use LegoW\View\Model\CsvModel;
    
        class TestController extends AbstractActionController
        {
            public function indexAction()
            {
                $view = new CsvModel();
                $view->setTerminate(true)
                     ->setVariables([
                         "data" => [
                             range(1,26),
                             range('a','z')
                         ]
                     ]);
                return $view;
            }
        }
    

The Versions

23/07 2018

dev-hotfix/0.2.1

dev-hotfix/0.2.1

CSV View strategy for the zend-view lib

  Sources   Download

MIT

The Requires

 

The Development Requires

by Turcsån Ádåm

10/07 2018

dev-master

9999999-dev

CSV View strategy for the zend-view lib

  Sources   Download

MIT

The Requires

 

The Development Requires

by Turcsån Ádåm

10/07 2018

0.2

0.2.0.0

CSV View strategy for the zend-view lib

  Sources   Download

MIT

The Requires

 

The Development Requires

by Turcsån Ádåm

04/07 2018

dev-develop

dev-develop

CSV View strategy for the zend-view lib

  Sources   Download

MIT

The Requires

 

The Development Requires

by Turcsån Ádåm

11/06 2018

dev-feature/renderer-as-delegator

dev-feature/renderer-as-delegator

CSV View strategy for the zend-view lib

  Sources   Download

MIT

The Requires

 

The Development Requires

by Turcsån Ádåm

29/10 2016

0.1

0.1.0.0

CSV View strategy for the zend-view lib

  Sources   Download

MIT

The Requires

 

The Development Requires

by Turcsån Ádåm