Class ThumbBase

Description

ThumbBase Class Definition

This is the base class that all implementations must extend. It contains the core variables and functionality common to all implementations, as well as the functions that allow plugins to augment those classes.

  • abstract:

Located in /legacy/ThumbBase.inc.php (line 35)


	
			
Direct descendents
Class Description
GdThumb GdThumb Class Definition
Variable Summary
Method Summary
ThumbBase __construct ( $fileName)
void getErrorMessage ()
void getFileName ()
void getFormat ()
void getHasError ()
array getImported ()
void importPlugins (array $registry)
void imports (string $object)
void setErrorMessage (object $errorMessage)
void setFileName (object $fileName)
void setFormat (object $format)
void setHasError (object $hasError)
void triggerError (string $errorMessage)
void __call (string $method, array $args)
Variables
string $errorMessage (line 58)

The last error message raised

  • access: protected
string $fileName (line 72)

The name of the file we're manipulating

This must include the path to the file (absolute paths recommended)

  • access: protected
string $format (line 78)

What the file format is (mime-type)

  • access: protected
bool $hasError (line 64)

Whether or not the current instance has any errors

  • access: protected
array $imported (line 44)

All imported objects

An array of imported plugin objects

  • access: protected
array $importedFunctions (line 52)

All imported object functions

An array of all methods added to this class by imported plugin objects

  • access: protected
bool $remoteImage (line 84)

Whether or not the image is hosted remotely

  • access: protected
Methods
Constructor __construct (line 91)

Class constructor

  • access: public
ThumbBase __construct ( $fileName)
  • $fileName

Redefined in descendants as:
fileExistsAndReadable (line 147)

Checks to see if $this->fileName exists and is readable

  • access: protected
void fileExistsAndReadable ()
getErrorMessage (line 228)

Returns $errorMessage.

void getErrorMessage ()
getFileName (line 249)

Returns $fileName.

void getFileName ()
getFormat (line 270)

Returns $format.

void getFormat ()
getHasError (line 291)

Returns $hasError.

void getHasError ()
getImported (line 208)

Returns $imported.

array getImported ()
getImportedFunctions (line 218)

Returns $importedFunctions.

array getImportedFunctions ()
importPlugins (line 108)

Imports plugins in $registry to the class

  • access: public
void importPlugins (array $registry)
  • array $registry
imports (line 124)

Imports a plugin

This is where all the plugins magic happens! This function "loads" the plugin functions, making them available as methods on the class.

  • access: protected
void imports (string $object)
  • string $object: The name of the object to import / "load"
setErrorMessage (line 239)

Sets $errorMessage.

void setErrorMessage (object $errorMessage)
  • object $errorMessage
setFileName (line 260)

Sets $fileName.

void setFileName (object $fileName)
  • object $fileName
setFormat (line 281)

Sets $format.

void setFormat (object $format)
  • object $format
setHasError (line 302)

Sets $hasError.

void setHasError (object $hasError)
  • object $hasError
triggerError (line 173)

Sets $this->errorMessage to $errorMessage and throws an exception

Also sets $this->hasError to true, so even if the exceptions are caught, we don't attempt to proceed with any other functions

  • access: protected
void triggerError (string $errorMessage)
  • string $errorMessage
__call (line 192)

Calls plugin / imported functions

This is also where a fair amount of plugins magaic happens. This magic method is called whenever an "undefined" class method is called in code, and we use that to call an imported function.

You should NEVER EVER EVER invoke this function manually. The universe will implode if you do... seriously ;)

  • access: public
void __call (string $method, array $args)
  • string $method
  • array $args

Documentation generated on Tue, 09 Aug 2011 09:05:38 +0200 by phpDocumentor 1.4.3