Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Exporting and Importing Entities

Hunter Perrin edited this page May 8, 2018 · 7 revisions

Nymph provides a method for exporting and importing entities, regardless of which driver is currently in use. This allows backup, restore, duplication, or transferring an entire database of entities, even with different database drivers.

Nymph has the following methods for exporting and importing entities:

  • export - Export entities to a file.
  • exportPrint - Export entities to the client as a downloadable file.
  • import - Import entities from a file.
Exporting and Importing Entities
// Make sure the script doesn't terminate
// before the entities are exported/imported.
@set_time_limit(3600);

use Nymph\Nymph as Nymph;

// Export entities to a file.
Nymph::export($filename);

// Export entities to the client.
Nymph::exportPrint();

// Import entities from a file.
Nymph::import($filename);

The format of an entity export file is simple, and readable by all drivers. The file extension, NEX, stands for Nymph Entity eXchange.

Clone this wiki locally