Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
VersionDAO Class Reference
Inheritance diagram for VersionDAO:
DAO

Public Member Functions

_returnVersionFromRow ($row)
 
 disableVersion ($productType, $product)
 
getCurrentProducts ($context)
 
getCurrentVersion ($productType=null, $product=null, $isPlugin=false)
 
getVersionHistory ($productType=null, $product=null)
 
 insertVersion (&$version, $isPlugin=false)
 
 VersionDAO ()
 
- Public Member Functions inherited from DAO
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 DAO ($dataSource=null, $callHooks=true)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAffectedRows ()
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getType ($value)
 
 replace ($table, $arrFields, $keyCols)
 
retrieve ($sql, $params=false, $callHooks=true)
 
retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true)
 
retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true)
 
retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true)
 
 setCacheDir ()
 
 setDataSource (&$dataSource)
 
 update ($sql, $params=false, $callHooks=true, $dieOnError=true)
 
 updateDataObjectSettings ($tableName, &$dataObject, $idArray)
 

Additional Inherited Members

- Static Public Member Functions inherited from DAO
static getDataChangedEvent ($elementId=null, $parentElementId=null)
 
- Public Attributes inherited from DAO
 $_dataSource
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table= '', $id= '')
 

Detailed Description

Operations for retrieving and modifying Version objects.

See Also
Version

Definition at line 20 of file VersionDAO.inc.php.

Member Function Documentation

& VersionDAO::_returnVersionFromRow (   $row)

Internal function to return a Version object from a row.

Parameters
$rowarray
Returns
Version

Definition at line 112 of file VersionDAO.inc.php.

References HookRegistry\call(), and DAO\datetimeFromDB().

Referenced by getCurrentProducts(), getCurrentVersion(), and getVersionHistory().

VersionDAO::disableVersion (   $productType,
  $product 
)

Disable a product by setting its 'current' column to 0

Parameters
$productTypestring
$productstring

Definition at line 253 of file VersionDAO.inc.php.

References DAO\update().

& VersionDAO::getCurrentProducts (   $context)

Retrieve all currently enabled products within the given context as a two dimensional array with the first key representing the product type, the second key the product name and the value the product version.

Parameters
$contextarray the application context, only products enabled in that context will be returned.
Returns
array

Definition at line 219 of file VersionDAO.inc.php.

References _returnVersionFromRow(), Application\getPluginSettingsContextColumnName(), and DAO\retrieve().

& VersionDAO::getCurrentVersion (   $productType = null,
  $product = null,
  $isPlugin = false 
)

Retrieve the current version.

Parameters
$productTypestring
$productstring
$isPluginboolean
Returns
Version

Definition at line 35 of file VersionDAO.inc.php.

References _returnVersionFromRow(), and DAO\retrieve().

& VersionDAO::getVersionHistory (   $productType = null,
  $product = null 
)

Retrieve the complete version history, ordered by date (most recent first).

Parameters
$productTypestring
$productstring
Returns
array Versions

Definition at line 84 of file VersionDAO.inc.php.

References _returnVersionFromRow(), and DAO\retrieve().

Referenced by insertVersion().

VersionDAO::insertVersion ( $version,
  $isPlugin = false 
)

Insert a new version.

Parameters
$versionVersion
$isPluginboolean

Definition at line 137 of file VersionDAO.inc.php.

References DAO\datetimeToDB(), Core\getCurrentDate(), getVersionHistory(), and DAO\update().

VersionDAO::VersionDAO ( )

Constructor

Definition at line 24 of file VersionDAO.inc.php.


The documentation for this class was generated from the following file: