Abstract Class AKAbstractUnarchiver

Description

The base class of unarchiver classes

  • abstract:

Located in /administrator/components/com_joomlaupdate/restore.php (line 1206)

AKAbstractObject
   |
   --AKAbstractPart
      |
      --AKAbstractUnarchiver
Direct descendents
Class Description
 class AKUnarchiverJPA JPA archive extraction class
Variable Summary
Method Summary
 AKAbstractUnarchiver __construct ()
 void fread ($fp $fp, [$length $length = null])
 bool isEOF ([$local $local = false])
 void nextFile ()
 bool processFileData ()
 bool readFileHeader ()
 void setCorrectPermissions ($path $path)
 void shutdown ()
 void _finalize ()
 void _prepare ()
 void _run ()
 void __wakeup ()
Variables
string $addPath = '' (line 1230)
  • var: Absolute path to prepend to extracted files
  • access: protected
array $archiveList = array() (line 1212)
  • var: List of the names of all archive parts
  • access: public
integer $chunkSize = 524288 (line 1242)
  • var: Chunk size for processing
  • access: protected
integer $currentPartNumber = -1 (line 1218)
  • var: Current archive part number
  • access: protected
integer $currentPartOffset = 0 (line 1221)
  • var: The offset inside the current part
  • access: protected
int $dataReadLength = 0 (line 1254)
  • var: How much of the uncompressed data we've read so far
  • access: protected
stdClass $fileHeader = null (line 1251)
  • var: File header data, as read by the readFileHeader() method
  • access: protected
string $filename = null (line 1209)
  • var: Archive filename
  • access: protected
bool $flagRestorePermissions = false (line 1224)
  • var: Should I restore permissions?
  • access: protected
resource $fp = null (line 1245)
  • var: File pointer to the current archive part file
  • access: protected
AKAbstractPostproc $postProcEngine = null (line 1227)
  • var: Post processing class
  • access: protected
array $renameDirs = array() (line 1236)
  • var: Which directories to rename
  • access: public
array $renameFiles = array() (line 1233)
  • var: Which files to rename
  • access: public
int $runState = null (line 1248)
  • var: Run state when processing the current archive file
  • access: protected
array $skipFiles = array() (line 1239)
  • var: Which files to skip
  • access: public
int $totalSize = array() (line 1215)
  • var: The total size of all archive parts
  • access: public

Inherited Variables

Inherited from AKAbstractPart

AKAbstractPart::$active_domain
AKAbstractPart::$active_step
AKAbstractPart::$active_substep
AKAbstractPart::$databaseRoot
AKAbstractPart::$hasRan
AKAbstractPart::$isFinished
AKAbstractPart::$isPrepared
AKAbstractPart::$isRunning
AKAbstractPart::$observers
AKAbstractPart::$_parametersArray

Inherited from AKAbstractObject

AKAbstractObject::$_errors_queue_size
AKAbstractObject::$_warnings_queue_size
Methods
Constructor __construct (line 1259)

Public constructor

  • access: public
AKAbstractUnarchiver __construct ()

Redefinition of:
AKAbstractObject::__construct()
Public constructor, makes sure we are instanciated only by the factory class

Redefined in descendants as:
fread (line 1622)

Reads data from the archive and notifies the observer with the 'reading' message

  • access: protected
void fread ($fp $fp, [$length $length = null])
  • $fp $fp
  • $length $length
isEOF (line 1552)

Returns true if we have reached the end of file

  • return: True if we have reached End Of File
  • access: protected
bool isEOF ([$local $local = false])
  • $local $local: bool True to return EOF of the local file, false (default) to return if we have reached the end of the archive set
nextFile (line 1528)

Opens the next part file for reading

  • access: protected
void nextFile ()
processFileData (line 1615)

Concrete classes must use this method to process file data. It must set $runState to AK_STATE_DATAREAD when it's finished processing the file data.

  • return: True if processing the file data was successful, false if an error occured
  • abstract:
  • access: protected
bool processFileData ()

Redefined in descendants as:
  • AKUnarchiverJPA::processFileData() : Concrete classes must use this method to process file data. It must set $runState to AK_STATE_DATAREAD when it's finished processing the file data.
  • AKUnarchiverJPS::processFileData() : Concrete classes must use this method to process file data. It must set $runState to AK_STATE_DATAREAD when it's finished processing the file data.
readArchiveHeader (line 1602)

Concrete classes are supposed to use this method in order to read the archive's header and prepare themselves to the point of being ready to extract the first file.

  • abstract:
  • access: protected
void readArchiveHeader ()

Redefined in descendants as:
readFileHeader (line 1608)

Concrete classes must use this method to read the file header

  • return: True if reading the file was successful, false if an error occured or we reached end of archive
  • abstract:
  • access: protected
bool readFileHeader ()

Redefined in descendants as:
setCorrectPermissions (line 1580)

Tries to make a directory user-writable so that we can write a file to it

  • access: protected
void setCorrectPermissions ($path $path)
  • $path $path: string A path to a file
shutdown (line 1282)

Sleep function, called whenever the class is serialized

  • access: public
void shutdown ()
_finalize (line 1442)
  • access: protected
void _finalize ()

Redefinition of:
AKAbstractPart::_finalize()
Runs the finalisation process for this part. Should set _isFinished to true.
_prepare (line 1294)

Implements the abstract _prepare() method

  • access: protected
void _prepare ()

Redefinition of:
AKAbstractPart::_prepare()
Runs the preparation for this part. Should set _isPrepared
_run (line 1353)
  • access: protected
void _run ()

Redefinition of:
AKAbstractPart::_run()
Runs the main functionality loop for this part. Upon calling, should set the _isRunning to true. When it finished, should set the _hasRan to true. If an error is encountered, setError should be used.
__wakeup (line 1267)

Wakeup function, called whenever the class is unserialized

  • access: public
void __wakeup ()

Inherited Methods

Inherited From AKAbstractPart

 AKAbstractPart::attach()
 AKAbstractPart::detach()
 AKAbstractPart::getDomain()
 AKAbstractPart::getState()
 AKAbstractPart::getStatusArray()
 AKAbstractPart::getStep()
 AKAbstractPart::getSubstep()
 AKAbstractPart::notify()
 AKAbstractPart::setBreakFlag()
 AKAbstractPart::setDomain()
 AKAbstractPart::setState()
 AKAbstractPart::setStep()
 AKAbstractPart::setSubstep()
 AKAbstractPart::setup()
 AKAbstractPart::tick()
 AKAbstractPart::_finalize()
 AKAbstractPart::_makeReturnTable()
 AKAbstractPart::_prepare()
 AKAbstractPart::_run()

Inherited From AKAbstractObject

 AKAbstractObject::__construct()
 AKAbstractObject::getError()
 AKAbstractObject::getErrors()
 AKAbstractObject::getWarning()
 AKAbstractObject::getWarnings()
 AKAbstractObject::propagateFromObject()
 AKAbstractObject::propagateToObject()
 AKAbstractObject::resetErrors()
 AKAbstractObject::resetWarnings()
 AKAbstractObject::setError()
 AKAbstractObject::setErrorsQueueSize()
 AKAbstractObject::setWarning()
 AKAbstractObject::setWarningsQueueSize()

Documentation generated on Tue, 19 Nov 2013 15:12:16 +0100 by phpDocumentor 1.4.3