* @return $fileName The current file name
*/
function getFileName ();
+
+ /**
+ * Initializes counter for valid entries, arrays for damaged entries and
+ * an array for gap seek positions. If you call this method on your own,
+ * please re-analyze the file structure. So you are better to call
+ * analyzeFile() instead of this method.
+ *
+ * @return void
+ */
+ function initCountersGapsArray ();
+
+ /**
+ * Getter for header size
+ *
+ * @return $totalEntries Size of file header
+ */
+ function getHeaderSize ();
+
+ /**
+ * Setter for header size
+ *
+ * @param $headerSize Size of file header
+ * @return void
+ */
+ function setHeaderSize ($headerSize);
+
+ /**
+ * Getter for header array
+ *
+ * @return $totalEntries Size of file header
+ */
+ function getHeader ();
+
+ /**
+ * Setter for header
+ *
+ * @param $header Array for a file header
+ * @return void
+ */
+ function setHeader (array $header);
+
+ /**
+ * Updates seekPosition attribute from file to avoid to much access on file.
+ *
+ * @return void
+ */
+ function updateSeekPosition ();
}
// [EOF]
* @return void
*/
function setHeaderSize ($headerSize);
+
+ /**
+ * Getter for header array
+ *
+ * @return $totalEntries Size of file header
+ */
+ function getHeader ();
+
+ /**
+ * Setter for header
+ *
+ * @param $header Array for a file header
+ * @return void
+ */
+ function setHeader (array $header);
+
+ /**
+ * Updates seekPosition attribute from file to avoid to much access on file.
+ *
+ * @return void
+ */
+ function updateSeekPosition ();
}
// [EOF]
*
* @return $totalEntries Size of file header
*/
- protected final function getHeade () {
+ public final function getHeader () {
// Get it
return $this->header;
}
* @param $header Array for a file header
* @return void
*/
- protected final function setHeader (array $header) {
+ public final function setHeader (array $header) {
// Set it
$this->header = $header;
}
*
* @return void
*/
- protected function updateSeekPosition () {
+ public function updateSeekPosition () {
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
// Get key (= seek position)
$data = substr($data, 0, -1);
// And update seek position
- $this->updateSeekPosition();
+ $this->getIteratorInstance()->updateSeekPosition();
/*
* Now split it:
$header = explode(chr(BaseFile::SEPARATOR_HEADER_DATA), $data);
// Set it here
- $this->setHeader($header);
+ $this->getIteratorInstance()->setHeader($header);
// Check if the array has only 3 elements
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] header(%d)=%s', __METHOD__, __LINE__, count($header), print_r($header, TRUE)));
// Call block instance
$this->getBlockInstance()->setHeaderSize($headerSize);
}
+
+ /**
+ * Getter for header array
+ *
+ * @return $totalEntries Size of file header
+ */
+ public final function getHeader () {
+ // Call block instance
+ return $this->getBlockInstance()->getHeader();
+ }
+
+ /**
+ * Setter for header
+ *
+ * @param $header Array for a file header
+ * @return void
+ */
+ public final function setHeader (array $header) {
+ // Call block instance
+ $this->getBlockInstance()->setHeader($header);
+ }
+
+ /**
+ * Updates seekPosition attribute from file to avoid to much access on file.
+ *
+ * @return void
+ */
+ public function updateSeekPosition () {
+ // Call block instance
+ $this->getBlockInstance()->updateSeekPosition();
+ }
}
// [EOF]
$data = substr($data, 0, -1);
// And update seek position
- $this->updateSeekPosition();
+ $this->getIteratorInstance()->updateSeekPosition();
/*
* Now split it:
$header = explode(chr(BaseFile::SEPARATOR_HEADER_DATA), $data);
// Set header here
- $this->setHeader($header);
+ $this->getIteratorInstance()->setHeader($header);
// Check if the array has only 3 elements
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] header(%d)=%s', __METHOD__, __LINE__, count($header), print_r($header, TRUE)));