Class OnpubImages

Description

Manage images in an Onpub database.

Located in /OnpubImages.php (line 13)


	
			
Variable Summary
Method Summary
static void getThumbURL ( $phpThumbParams, [ $onpub_dir_phpthumb = '../api/phpThumb/'])
OnpubImages __construct (PDO $pdo, [bool $enableTransactions = TRUE])
int count ()
int delete (int $ID)
OnpubImage get (int $ID)
int getID (OnpubImage $image)
mixed insert (mixed $images)
array search (string $keywords, [OnpubQueryOptions $queryOptions = NULL])
array select ([OnpubQueryOptions $queryOptions = NULL])
int update (OnpubImage $image)
Variables
bool $enableTransactions (line 19)
  • access: public
Methods
static getThumbURL (line 426)
  • access: public
static void getThumbURL ( $phpThumbParams, [ $onpub_dir_phpthumb = '../api/phpThumb/'])
  • $phpThumbParams
  • $onpub_dir_phpthumb
Constructor __construct (line 42)

Connect to an Onpub database.

All the methods in this class which query the database use the database connection provided by the PDO object required by this constructor. Currently, Onpub only supports MySQL as a database for storing content. Therefore, when constructing the PDO object, only the PDO_MYSQL driver is supported as a PDO data source.

All the methods in this class require the Onpub schema to be installed in the PDO-connected database. The OnpubDatabase class contains methods to manage the Onpub schema. The Onpub schema can also be installed by clicking the "Install the schema" link once logged in to the Onpub web interface. The schema generally only has to be installed once per database.

OnpubImages __construct (PDO $pdo, [bool $enableTransactions = TRUE])
count (line 52)
  • access: public
int count ()
delete (line 414)
  • return: 1 if the image was deleted, 0 if the image does not exist in the database.
  • access: public
int delete (int $ID)
  • int $ID: ID of the image to delete.
get (line 150)
  • return: An OnpubImage object. NULL if the image does not exist in the database.
  • access: public
OnpubImage get (int $ID)
  • int $ID: ID of the image to get.
getID (line 202)
  • return: The ID of the image. NULL if the image does not exist in the database.
  • access: public
int getID (OnpubImage $image)
  • OnpubImage $image: Image whose ID you want to get.
insert (line 76)
  • return: The ID(s) of the new image(s). An int will be returned if a single image was inserted. An array of ints will be returned if multiple images were inserted.
  • throws: PDOException if there's a database error.
  • access: public
mixed insert (mixed $images)
  • mixed $images: A single OnpubImage object or an array of OnpubImage objects (to insert multiple images at a time).
search (line 315)
  • return: All the images which were found as an array of OnpubImage objects.
  • access: public
array search (string $keywords, [OnpubQueryOptions $queryOptions = NULL])
select (line 226)
  • return: An array of OnpubImage objects.
  • access: public
array select ([OnpubQueryOptions $queryOptions = NULL])
update (line 386)
  • return: 1 if the image was updated. 0 if the image does not exist in the database.
  • access: public
int update (OnpubImage $image)

Documentation generated on Fri, 08 Feb 2013 04:02:21 -0500 by phpDocumentor 1.4.4