Open Journal Systems  3.3.0
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)
 
- Public Member Functions inherited from DAO
 __construct ($dataSource=null, $callHooks=true)
 
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAdditionalFieldNames ()
 
 getAffectedRows ()
 
 getDataObjectSettings ($tableName, $idFieldName, $idFieldValue, $dataObject)
 
 getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getLocaleFieldNames ()
 
 getType ($value)
 
 handleError ($dataSource, $sql)
 
 nullOrInt ($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, $content='')
 
- Data Fields 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

◆ _returnVersionFromRow()

VersionDAO::_returnVersionFromRow (   $row)

Internal function to return a Version object from a row.

Parameters
$rowarray
Returns
Version

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

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

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

◆ disableVersion()

VersionDAO::disableVersion (   $productType,
  $product 
)

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

Parameters
$productTypestring
$productstring

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

References DAO\update().

◆ getCurrentProducts()

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 215 of file VersionDAO.inc.php.

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

◆ getCurrentVersion()

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

Retrieve the current version.

Parameters
$productTypestring
$productstring
$isPluginboolean
Returns
Version

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

References $application, _returnVersionFromRow(), fatalError(), PKPApplication\get(), and DAO\retrieve().

◆ getVersionHistory()

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 79 of file VersionDAO.inc.php.

References $application, _returnVersionFromRow(), PKPApplication\get(), and DAO\retrieve().

Referenced by insertVersion().

◆ insertVersion()

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

Insert a new version.

Parameters
$versionVersion
$isPluginboolean

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

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


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