public function export(PortableElementObject $object)
    {
        $zip = new \ZipArchive();
        $path = $this->getZipLocation($object);

        if ($zip->open($path, \ZipArchive::CREATE) !== TRUE) {
            throw new \common_Exception('Unable to create zipfile ' . $path);
        }

        $manifest = $this->getManifest($object);
        $zip->addFromString($this->getModel()->getManifestName(), $manifest);

        $files = $this->getFilesFromPortableElement($object);

        $filesystem = $this->getFileSystem();
        foreach ($files as $file) {
            if(strpos($file, './') === 0){
                //only export the files that are in the portable element package (exclude the shared libraries)
                $zip->addFromString($file, $filesystem->getFileContentFromModelStorage($object, $file));
            }
        }

        $zip->close();
        return $path;
    }