Open Journal Systems  3.3.0
PubObjectCache Class Reference

Public Member Functions

 _insertInternally ($object, $cacheId, $id1, $id2=null)
 
 add ($object, $parent)
 
 get ($cacheId, $id1, $id2=null)
 
 isCached ($cacheId, $id1, $id2=null)
 
 markComplete ($cacheId, $objectId)
 

Data Fields

 $_objectCache = array()
 

Detailed Description

A cache for publication objects required during export.

Definition at line 17 of file PubObjectCache.inc.php.

Member Function Documentation

◆ _insertInternally()

PubObjectCache::_insertInternally (   $object,
  $cacheId,
  $id1,
  $id2 = null 
)

Insert an object into the cache.

Parameters
$objectobject
$cacheIdstring
$id1integer
$id2integer

Definition at line 126 of file PubObjectCache.inc.php.

References isCached().

Referenced by add().

◆ add()

PubObjectCache::add (   $object,
  $parent 
)

Add a publishing object to the cache.

Parameters
$objectIssue|Submission|ArticleGalley
$parentSubmission|null Only required when adding a galley.

Definition at line 33 of file PubObjectCache.inc.php.

References _insertInternally().

◆ get()

PubObjectCache::get (   $cacheId,
  $id1,
  $id2 = null 
)

Retrieve (an) object(s) from the cache.

NB: You must check whether an object is in the cache before you try to retrieve it with this method.

Parameters
$cacheIdstring
$id1integer
$id2integer
Returns
mixed

Definition at line 77 of file PubObjectCache.inc.php.

References isCached().

◆ isCached()

PubObjectCache::isCached (   $cacheId,
  $id1,
  $id2 = null 
)

Check whether a given object is in the cache.

Parameters
$cacheIdstring
$id1integer
$id2integer
Returns
boolean

Definition at line 97 of file PubObjectCache.inc.php.

Referenced by _insertInternally(), and get().

◆ markComplete()

PubObjectCache::markComplete (   $cacheId,
  $objectId 
)

Marks the given cache id "complete", i.e. it contains all child objects for the given object id.

Parameters
$cacheId
$objectId

Definition at line 57 of file PubObjectCache.inc.php.

Field Documentation

◆ $_objectCache

PubObjectCache::$_objectCache = array()

Definition at line 22 of file PubObjectCache.inc.php.


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