Download the PHP package royalcms/data-export without Composer

On this page you can find all versions of the php package royalcms/data-export. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package data-export

Create zip files containing export data

This package makes it easy to let a user download an export containing all the personal data. Such an export consists of a zip file containing all the user properties and related info.

You can create and mail such a zip by dispatching the CreateCustomizeDataExportJob job:

The package will create a zip containing all the customize data. When the zip has been created, a link to it will be mailed to the user. By default, the zips are saved in a non-public location, and the user should be logged in to be able to download the zip.

You can configure which data will will be exported in the selectCustomizeData method on the model.

This package also offers an artisan command to remove old zip files.

You must add a disk named data-exports to config/filesystems. You can use any driver that you want. We recommend that your disk is not publicly accessible. If you're using the local driver, make sure you use a path that is not inside the public path of your app.

Usage

Selecting customize data

First, you'll have to prepare your user model. You should let your model implement the Royalcms\Component\DataExport\ExportsCustomizeData interface. This is what that interface looks like:

The selectCustomizeData is used to determine the content of the customize download. Here's an example implementation:

$customizeDataSelection is used to determine the content of the zip file that the user will be able to download. You can call these methods on it:

The name of the export itself can be set using the customizeDataExportName on the user. This will only affect the name of the download that will be sent as a response to the user, not the name of the zip stored on disk.

Creating an export

You can create a personal data export by executing this job somewhere in your application:

By default, this job is queued. It will copy all files and content you selected in the selectCustomizeData on your user to a temporary directory. Next, that temporary directory will be zipped and copied over to the data-exports disk. A link to this zip will be mailed to the user.

Securing the export

We recommend that the data-exports disk is not publicly accessible. If you're using the local driver for this disk, make sure you use a path that is not inside the public path of your app.

Customizing the queue

You can customize the job that creates the zip file and mails it by extending the Royalcms\Component\DataExport\Jobs\CreateCustomizeDataExportJob and dispatching your own custom job class.

Events

CustomizeDataSelected

This event will be fired after the personal data has been selected. It has two public properties:

CustomizeDataExportCreated

This event will be fired after the personal data zip has been created. It has two public properties:

CustomizeDataExportDownloaded

This event will be fired after the export has been download. It has two public properties:

You could use this event to immediately clean up the downloaded zip.


All versions of data-export with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package royalcms/data-export contains the following files

Loading the files please wait ....