public function export()
    {
        if (!$this->isXmlHttpRequest()) {
            throw new \Exception('Only ajax call allowed.');
        }

        if (!$this->hasRequestParameter(self::PARAMETER_DELIVERY_CLASS_URI) && !$this->hasRequestParameter(self::PARAMETER_DELIVERY_URI)) {
            throw new \common_Exception('Parameter "'. self::PARAMETER_DELIVERY_CLASS_URI .'" or "'. self::PARAMETER_DELIVERY_URI .'" missing');
        }

        $resourceUri = $this->hasRequestParameter(self::PARAMETER_DELIVERY_URI)
            ? \tao_helpers_Uri::decode($this->getRequestParameter(self::PARAMETER_DELIVERY_URI))
            : \tao_helpers_Uri::decode($this->getRequestParameter(self::PARAMETER_DELIVERY_CLASS_URI));

        /** @var ResultsExporter $exporter */
        $exporter = $this->propagate(new ResultsExporter($resourceUri, ResultsService::singleton()));

        return $this->returnTaskJson($exporter->createExportTask());
    }
public function export()
    {
        if (!$this->isXmlHttpRequest()) {
            throw new \Exception('Only ajax call allowed.');
        }

        if (!$this->hasRequestParameter(self::PARAMETER_DELIVERY_CLASS_URI) && !$this->hasRequestParameter(self::PARAMETER_DELIVERY_URI)) {
            throw new \common_Exception('Parameter "'. self::PARAMETER_DELIVERY_CLASS_URI .'" or "'. self::PARAMETER_DELIVERY_URI .'" missing');
        }

        $resourceUri = $this->hasRequestParameter(self::PARAMETER_DELIVERY_URI)
            ? \tao_helpers_Uri::decode($this->getRequestParameter(self::PARAMETER_DELIVERY_URI))
            : \tao_helpers_Uri::decode($this->getRequestParameter(self::PARAMETER_DELIVERY_CLASS_URI));

        /** @var ResultsExporter $exporter */
        $exporter = $this->propagate(new ResultsExporter($resourceUri, ResultsService::singleton()));

        return $this->returnTaskJson($exporter->createExportTask());
    }
public function export ( ) { if ( ! $ this -> isXmlHttpRequest ( ) ) { throw new \ Exception ( 'Only ajax call allowed.' ) ; } if ( ! $ this -> hasRequestParameter ( self :: PARAMETER_DELIVERY_CLASS_URI ) && ! $ this -> hasRequestParameter ( self :: PARAMETER_DELIVERY_URI ) ) { throw new \ common_Exception ( 'Parameter "' . self :: PARAMETER_DELIVERY_CLASS_URI . '" or "' . self :: PARAMETER_DELIVERY_URI . '" missing' ) ; } $ resourceUri = $ this -> hasRequestParameter ( self :: PARAMETER_DELIVERY_URI ) ? \ tao_helpers_Uri :: decode ( $ this -> getRequestParameter ( self :: PARAMETER_DELIVERY_URI ) ) : \ tao_helpers_Uri :: decode ( $ this -> getRequestParameter ( self :: PARAMETER_DELIVERY_CLASS_URI ) ) ; /** @var ResultsExporter $exporter */ $ exporter = $ this -> propagate ( new ResultsExporter ( $ resourceUri , ResultsService :: singleton ( ) ) ) ; return $ this -> returnTaskJson ( $ exporter -> createExportTask ( ) ) ; }
Exports results by either a class or a single delivery.

Only creating the export task.

@throws Exception
@throws \common_Exception
Exports results by either a class or a single delivery .