itemsPerPage = $itemsPerPage; } /** * Turns the provided items into their serialized form. * * @param array $items Array of items to serialize. All of them are serialized, regardless of $start and $total. * @param int $start Assuming that $items is a fragment of the total, this is the global index of the first item in * $items. * @param int $count The number of items requested for this export step. Actual number of items can be smaller due * to errors, and can not be greater than the requested count, because that would indicate that the requested * count is ignored when generating items. This value is ignored when using CSV exporter. * @param int $total The global total of items that could be exported. This value is ignored when using CSV exporter. * @return string The items in serialized form. */ abstract public function serializeItems($items, $start, $count, $total); /** * Like serializeItems(), but the output is written to filesystem instead of being returned. * * @param string $targetDirectory The directory to which the file is written. The filename is at the exporter * implementation's discretion. * @param array $items Array of items to serialize. All of them are serialized, regardless of $start and $total. * @param int $start Assuming that $items is a fragment of the total, this is the global index of the first item in * $items. * @param int $count The number of items requested for this export step. Actual number of items can be smaller due * to errors, and can not be greater than the requested count, because that would indicate that the requested * count is ignored when generating items. This value is ignored when using CSV exporter. * @param int $total The global total of items that could be exported. This value is ignored when using CSV exporter. * @return string Full path of the written file. */ abstract public function serializeItemsToFile($targetDirectory, $items, $start, $count, $total); /** * Creates an export format-specific item instance. * * @param string $id Unique ID of the item. * @return Item The newly generated item. */ abstract public function createItem($id); }