Order/Export/OrderExporter.php
public function exportAllDueOrders()
    {
        $path = tempnam(sys_get_temp_dir(), 'acc');

        $zip = new \ZipArchive();

        if (false === $zip->open($path)) {
            throw new RuntimeException("Failed to open '$path' for writing.");
        }

        $zip->addFile($this->exportRegularDueOrders(), 'regular-due-orders.csv');
        $zip->addFile($this->exportOutstandingExpiredDueOrders(), 'outstanding-expired-due-orders.csv');
        $zip->addFile($this->exportOutstandingFallDueOrders(), 'outstanding-fall-due-orders.csv');
        $zip->addFile($this->exportOutstandingPendingDueOrders(), 'outstanding-pending-due-orders.csv');

        $zip->close();

        return $path;
    }
public function exportAllDueOrders()
    {
        $path = tempnam(sys_get_temp_dir(), 'acc');

        $zip = new \ZipArchive();

        if (false === $zip->open($path)) {
            throw new RuntimeException("Failed to open '$path' for writing.");
        }

        $zip->addFile($this->exportRegularDueOrders(), 'regular-due-orders.csv');
        $zip->addFile($this->exportOutstandingExpiredDueOrders(), 'outstanding-expired-due-orders.csv');
        $zip->addFile($this->exportOutstandingFallDueOrders(), 'outstanding-fall-due-orders.csv');
        $zip->addFile($this->exportOutstandingPendingDueOrders(), 'outstanding-pending-due-orders.csv');

        $zip->close();

        return $path;
    }
public function exportAllDueOrders ( ) { $ path = tempnam ( sys_get_temp_dir ( ) , 'acc' ) ; $ zip = new \ ZipArchive ( ) ; if ( false === $ zip -> open ( $ path ) ) { throw new RuntimeException ( "Failed to open '$path' for writing." ) ; } $ zip -> addFile ( $ this -> exportRegularDueOrders ( ) , 'regular-due-orders.csv' ) ; $ zip -> addFile ( $ this -> exportOutstandingExpiredDueOrders ( ) , 'outstanding-expired-due-orders.csv' ) ; $ zip -> addFile ( $ this -> exportOutstandingFallDueOrders ( ) , 'outstanding-fall-due-orders.csv' ) ; $ zip -> addFile ( $ this -> exportOutstandingPendingDueOrders ( ) , 'outstanding-pending-due-orders.csv' ) ; $ zip -> close ( ) ; return $ path ; }
Export all the due orders (archive with all CSV files).

@return string The export file path.
Export all the due orders ( archive with all CSV files ) .