Open Journal Systems  3.3.0
SiteDAO Class Reference
Inheritance diagram for SiteDAO:
DAO

Public Member Functions

 _fromRow ($primaryRow, $callHook=true)
 
getSite ()
 
 insertSite (&$site)
 
 newDataObject ()
 
 updateObject ($site)
 
- 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)
 

Data Fields

 $primaryTableColumns
 
- Data Fields inherited from DAO
 $_dataSource
 

Additional Inherited Members

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

Detailed Description

Operations for retrieving and modifying the Site object.

See also
Site

Definition at line 19 of file SiteDAO.inc.php.

Member Function Documentation

◆ _fromRow()

SiteDAO::_fromRow (   $primaryRow,
  $callHook = true 
)

Return a DataObject from a result row

Parameters
$primaryRowarray The result row from the primary table lookup
Returns
DataObject

Definition at line 63 of file SiteDAO.inc.php.

References PKPServices\get(), and newDataObject().

Referenced by getSite().

◆ getSite()

& SiteDAO::getSite ( )

Retrieve site information.

Returns
Site

Definition at line 38 of file SiteDAO.inc.php.

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

◆ insertSite()

SiteDAO::insertSite ( $site)

Insert site information.

Parameters
$siteSite

Definition at line 116 of file SiteDAO.inc.php.

◆ newDataObject()

SiteDAO::newDataObject ( )

Instantiate and return a new DataObject.

Returns
Site

Definition at line 56 of file SiteDAO.inc.php.

Referenced by _fromRow().

◆ updateObject()

SiteDAO::updateObject (   $site)

Update an object

When updating an object, we remove table rows for any settings which are no longer present.

Multilingual fields are an exception to this. When a locale key is missing from the object, it is not removed from the database. This is to ensure that data from a locale which is later disabled is not automatically removed from the database, and will appear if the locale is re-enabled.

To delete a value for a locale key, a null value must be passed.

Parameters
$objectDataObject The object to insert into the database

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

References PKPServices\get().

Field Documentation

◆ $primaryTableColumns

array SiteDAO::$primaryTableColumns
Initial value:
= [
'redirect' => 'redirect',
'primaryLocale' => 'primary_locale',
'minPasswordLength' => 'min_password_length',
'installedLocales' => 'installed_locales',
'supportedLocales' => 'supported_locales',
]

Maps schema properties for the primary table to their column names

Definition at line 25 of file SiteDAO.inc.php.


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