src/Utility/Export.php
public function execute(int $page, int $limit): void
    {
        $page = $page <= 1 ? 1 : $page;
        $rows = $this->getRows($page, $limit);

        $headers = [];
        $mode = 'a';
        if (1 === $page) {
            $headers = $this->getHeaders();
            $mode = 'w';
        }

        // Prepend columns to result
        if (!empty($headers)) {
            array_unshift($rows, $headers);
        }

        $this->create($rows, $mode);
    }
public function execute(int $page, int $limit): void
    {
        $page = $page <= 1 ? 1 : $page;
        $rows = $this->getRows($page, $limit);

        $headers = [];
        $mode = 'a';
        if (1 === $page) {
            $headers = $this->getHeaders();
            $mode = 'w';
        }

        // Prepend columns to result
        if (!empty($headers)) {
            array_unshift($rows, $headers);
        }

        $this->create($rows, $mode);
    }
public function execute ( int $ page , int $ limit ) : void { $ page = $ page <= 1 ? 1 : $ page ; $ rows = $ this -> getRows ( $ page , $ limit ) ; $ headers = [ ] ; $ mode = 'a' ; if ( 1 === $ page ) { $ headers = $ this -> getHeaders ( ) ; $ mode = 'w' ; } // Prepend columns to result if ( ! empty ( $ headers ) ) { array_unshift ( $ rows , $ headers ) ; } $ this -> create ( $ rows , $ mode ) ; }
Execute export.

@param int $page Pagination page
@param int $limit Pagination limit
@return void
Execute export .