public function export(string $filename)
    {
        $zip = new CNabuZipBuilder();
        $unlink_files = array();

        if ($this->getObjectsCount() > 0) {
            $file = new CNabuXMLBuilder();
            $package = new CNabuXMLPackage($this->nb_customer);
            if ($this->nb_language_list->getSize() > 0) {
                $package->setXMLLanguageList(new CNabuXMLLanguageList($this->nb_language_list));
            }
            if ($this->nb_role_list->getSize() > 0) {
                $package->setXMLRoleList(new CNabuXMLRoleList($this->nb_role_list));
            }
            if ($this->nb_site_list->getSize() > 0) {
                $package->setXMLSiteList(new CNabuXMLSiteList($this->nb_site_list));
            }
            $file->addFragment($package);
            $file->create();
            $zip->addFragment(new CNabuZipStream($zip, 'data', 'package.xml', $file));
        }

        $zip->exportToFile($filename);

        foreach ($unlink_files as $filename) {
            unlink($filename);
        }
    }