Class OnpubSections

Description

Manage sections in an Onpub database.

Located in /OnpubSections.php (line 13)


	
			
Variable Summary
Method Summary
OnpubSections __construct (PDO $pdo, [bool $enableTransactions = TRUE])
int count ()
int delete (int $ID)
OnpubSection get (int $ID, [OnpubQueryOptions $queryOptions = NULL])
int getID (OnpubSection $section)
mixed insert (mixed $sections, [ $insertWSMaps = FALSE])
array search (string $keywords, [OnpubQueryOptions $queryOptions = NULL])
array select ([OnpubQueryOptions $queryOptions = NULL], [ $websiteID = NULL], [ $flatSectionList = TRUE], [ $parentID = NULL])
int update (OnpubSection $section)
Variables
bool $enableTransactions (line 19)
  • access: public
Methods
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.

OnpubSections __construct (PDO $pdo, [bool $enableTransactions = TRUE])
count (line 52)
  • access: public
int count ()
delete (line 75)
  • return: 1 if the section was deleted, 0 if the section does not exist in the database.
  • access: public
int delete (int $ID)
  • int $ID: ID of the section to delete.
get (line 372)
  • return: An OnpubSection object. NULL if the section does not exist in the database.
  • access: public
OnpubSection get (int $ID, [OnpubQueryOptions $queryOptions = NULL])
getID (line 582)
  • return: The ID of the section. NULL if the section does not exist in the database.
  • access: public
int getID (OnpubSection $section)
insert (line 619)
  • return: The ID(s) of the new section(s). An int will be returned if a single section was inserted. An array of ints will be returned if multiple sections were inserted.
  • throws: PDOException if there's a database error.
  • access: public
mixed insert (mixed $sections, [ $insertWSMaps = FALSE])
  • mixed $sections: A single OnpubSection object or an array of OnpubSection objects (to insert multiple sections at a time).
  • $insertWSMaps
search (line 125)
  • return: All the sections which were found as an array of OnpubSection objects.
  • access: public
array search (string $keywords, [OnpubQueryOptions $queryOptions = NULL])
select (line 197)
array select ([OnpubQueryOptions $queryOptions = NULL], [ $websiteID = NULL], [ $flatSectionList = TRUE], [ $parentID = NULL])
  • OnpubQueryOptions $queryOptions: Database query options.
  • $websiteID
  • $flatSectionList
  • $parentID
update (line 732)
  • return: 1 if the section was updated. 0 if the section was not updated or does not exist.
  • access: public
int update (OnpubSection $section)

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