private function exportIntoFolder(\core_kernel_classes_Class $deliveryClass, $destination)
    {
        /** @var \core_kernel_classes_Resource $delivery */
        foreach ($deliveryClass->getInstances(false) as $delivery) {
            (new SingleDeliveryResultsExporter(
                $delivery,
                $this->resultsService,
                (new ColumnsProvider($delivery, $this->resultsService))
            ))
                ->setServiceLocator($this->getServiceLocator())
                ->export($destination);
        }

        if ($subClasses = $deliveryClass->getSubClasses(false)) {
            /** @var \core_kernel_classes_Class $subClass */
            foreach ($subClasses as $subClass) {
                $newDestination = $destination . DIRECTORY_SEPARATOR . \tao_helpers_Display::textCleaner($subClass->getLabel(), '*');
                mkdir($newDestination);
                $this->exportIntoFolder($subClass, $newDestination);
            }
        }
    }
private function exportIntoFolder(\core_kernel_classes_Class $deliveryClass, $destination)
    {
        /** @var \core_kernel_classes_Resource $delivery */
        foreach ($deliveryClass->getInstances(false) as $delivery) {
            (new SingleDeliveryResultsExporter(
                $delivery,
                $this->resultsService,
                (new ColumnsProvider($delivery, $this->resultsService))
            ))
                ->setServiceLocator($this->getServiceLocator())
                ->export($destination);
        }

        if ($subClasses = $deliveryClass->getSubClasses(false)) {
            /** @var \core_kernel_classes_Class $subClass */
            foreach ($subClasses as $subClass) {
                $newDestination = $destination . DIRECTORY_SEPARATOR . \tao_helpers_Display::textCleaner($subClass->getLabel(), '*');
                mkdir($newDestination);
                $this->exportIntoFolder($subClass, $newDestination);
            }
        }
    }
private function exportIntoFolder ( \ core_kernel_classes_Class $ deliveryClass , $ destination ) { /** @var \core_kernel_classes_Resource $delivery */ foreach ( $ deliveryClass -> getInstances ( false ) as $ delivery ) { ( new SingleDeliveryResultsExporter ( $ delivery , $ this -> resultsService , ( new ColumnsProvider ( $ delivery , $ this -> resultsService ) ) ) ) -> setServiceLocator ( $ this -> getServiceLocator ( ) ) -> export ( $ destination ) ; } if ( $ subClasses = $ deliveryClass -> getSubClasses ( false ) ) { /** @var \core_kernel_classes_Class $subClass */ foreach ( $ subClasses as $ subClass ) { $ newDestination = $ destination . DIRECTORY_SEPARATOR . \ tao_helpers_Display :: textCleaner ( $ subClass -> getLabel ( ) , '*' ) ; mkdir ( $ newDestination ) ; $ this -> exportIntoFolder ( $ subClass , $ newDestination ) ; } } }
Recursively exports all results under a class into a folder.

@param \core_kernel_classes_Class $deliveryClass
@param string $destination
Recursively exports all results under a class into a folder .