Class OnpubWebsites

Description

Manage websites in an Onpub database.

Located in /OnpubWebsites.php (line 14)


	
			
Variable Summary
Method Summary
OnpubWebsites __construct ( $pdo, [bool $enableTransactions = TRUE])
int count ()
int delete (int $ID)
OnpubWebsite get (int $ID, [OnpubQueryOptions $queryOptions = NULL], [ $flatArticleList = FALSE])
int getID (OnpubWebsite $website)
mixed insert (mixed $websites)
array search (string $keywords, [OnpubQueryOptions $queryOptions = NULL])
array select ([OnpubQueryOptions $queryOptions = NULL])
int update (OnpubWebsite $website)
Variables
bool $enableTransactions (line 20)
  • access: public
Methods
Constructor __construct (line 43)

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.

OnpubWebsites __construct ( $pdo, [bool $enableTransactions = TRUE])
count (line 53)
  • access: public
int count ()
delete (line 76)
  • return: 1 if the website was deleted, 0 if the website does not exist in the database.
  • access: public
int delete (int $ID)
  • int $ID: ID of the website to delete.
get (line 228)
  • return: An OnpubWebsite object. NULL if the website does not exist in the database.
  • access: public
OnpubWebsite get (int $ID, [OnpubQueryOptions $queryOptions = NULL], [ $flatArticleList = FALSE])
  • int $ID: ID of the website to get.
  • OnpubQueryOptions $queryOptions
  • $flatArticleList
getID (line 545)
  • return: The ID of the website. NULL if the website does not exist in the database.
  • access: public
int getID (OnpubWebsite $website)
insert (line 568)
  • return: The ID(s) of the new website(s). An int will be returned if a single website was inserted. An array of ints will be returned if multiple websites were inserted.
  • throws: PDOException if there's a database error.
  • access: public
mixed insert (mixed $websites)
  • mixed $websites: A single OnpubWebsite object or an array of OnpubWebsite objects (to insert multiple websites at a time).
search (line 92)
  • return: All the websites which were found as an array of OnpubWebsite objects.
  • access: public
array search (string $keywords, [OnpubQueryOptions $queryOptions = NULL])
select (line 162)
array select ([OnpubQueryOptions $queryOptions = NULL])
update (line 654)
  • return: 1 if the website was updated. 0 if the website does not exist in the database.
  • access: public
int update (OnpubWebsite $website)

Documentation generated on Sat, 20 Sep 2008 19:13:32 -0400 by phpDocumentor 1.4.2