Public Member Functions | Public Attributes

Version Class Reference

Version object. More...

Inheritance diagram for Version:
BEAppModel AppModel

List of all members.

Public Member Functions

 addRevision (array &$oldData, array &$newData)
 Create a new revision, creating a 'diff' between two object data arrays and saving a new record in 'versions'.
 diffData ($id, $revNum)
 Create a diff array containing only changed fields between last version and requested revision.
 revisionData ($id, $revNum, BEAppModel $model)
 Return revision data for a specified model, by id and revision number.
 numRevisions ($id)
 Return number of revisions for specified object id.

Public Attributes

 $belongsTo = array("User")

Detailed Description

Version object.

Version:
$Revision$ $LastChangedBy$ $LastChangedDate$

$Id$

Definition at line 31 of file version.php.


Member Function Documentation

Version::addRevision ( array &$  oldData,
array &$  newData 
)

Create a new revision, creating a 'diff' between two object data arrays and saving a new record in 'versions'.

Parameters:
array $oldData
array $newData

Definition at line 49 of file version.php.

Version::diffData ( id,
revNum 
)

Create a diff array containing only changed fields between last version and requested revision.

Parameters:
int $id, object id
int $revNum, revision number requested
Returns:
array with revision information,

Definition at line 89 of file version.php.

Referenced by revisionData().

Version::numRevisions ( id  ) 

Return number of revisions for specified object id.

Parameters:
int $id
Returns:
int

Definition at line 133 of file version.php.

Version::revisionData ( id,
revNum,
BEAppModel model 
)

Return revision data for a specified model, by id and revision number.

Parameters:
int $id
int $revNum
BEAppModel $model
Returns:
array

Definition at line 115 of file version.php.

References diffData().


The documentation for this class was generated from the following file:
Generated on Fri Dec 11 2015 15:29:47 by Doxygen 1.7.1  BEditaBEdita 3.7 Corylus