public function export($formValues, $destination)
    {
        if (isset($formValues['filename'], $formValues['resource'])) {
            $class = new core_kernel_classes_Class($formValues['resource']);
            $adapter = new tao_helpers_data_GenerisAdapterRdf();
            $rdf = $adapter->export($class);

            if (!empty($rdf)) {
                $name = $formValues['filename'] . '_' . time() . '.rdf';
                $path = tao_helpers_File::concat([$destination, $name]);

                if (!tao_helpers_File::securityCheck($path, true)) {
                    throw new Exception('Unauthorized file name');
                }

                if (file_put_contents($path, $rdf)) {
                    $this->getEventManager()->trigger(new RdfExportEvent($class));

                    return $path;
                }
            }
        }

        return '';
    }
public function export($formValues, $destination)
    {
        if (isset($formValues['filename'], $formValues['resource'])) {
            $class = new core_kernel_classes_Class($formValues['resource']);
            $adapter = new tao_helpers_data_GenerisAdapterRdf();
            $rdf = $adapter->export($class);

            if (!empty($rdf)) {
                $name = $formValues['filename'] . '_' . time() . '.rdf';
                $path = tao_helpers_File::concat([$destination, $name]);

                if (!tao_helpers_File::securityCheck($path, true)) {
                    throw new Exception('Unauthorized file name');
                }

                if (file_put_contents($path, $rdf)) {
                    $this->getEventManager()->trigger(new RdfExportEvent($class));

                    return $path;
                }
            }
        }

        return '';
    }
public function export ( $ formValues , $ destination ) { if ( isset ( $ formValues [ 'filename' ] , $ formValues [ 'resource' ] ) ) { $ class = new core_kernel_classes_Class ( $ formValues [ 'resource' ] ) ; $ adapter = new tao_helpers_data_GenerisAdapterRdf ( ) ; $ rdf = $ adapter -> export ( $ class ) ; if ( ! empty ( $ rdf ) ) { $ name = $ formValues [ 'filename' ] . '_' . time ( ) . '.rdf' ; $ path = tao_helpers_File :: concat ( [ $ destination , $ name ] ) ; if ( ! tao_helpers_File :: securityCheck ( $ path , true ) ) { throw new Exception ( 'Unauthorized file name' ) ; } if ( file_put_contents ( $ path , $ rdf ) ) { $ this -> getEventManager ( ) -> trigger ( new RdfExportEvent ( $ class ) ) ; return $ path ; } } } return '' ; }
Run the export process.

@param array $formValues
@param string $destination
@return string
@throws EasyRdf_Exception
@throws common_exception_Error
@throws Exception
Run the export process .