1: <?php
2:
3: namespace Charcoal\Object;
4:
5: /**
6: *
7: */
8: interface RevisionableInterface
9: {
10: /**
11: * @param boolean $enabled The (revision) enabled flag.
12: * @return RevisionableInterface Chainable
13: */
14: public function setRevisionEnabled($enabled);
15:
16: /**
17: * @return boolean
18: */
19: public function revisionEnabled();
20:
21: /**
22: * Create a revision object.
23: *
24: * @return \Charcoal\Object\ObjectRevisionInterface
25: */
26: public function createRevisionObject();
27:
28: /**
29: * Retrieve the class name of the object revision model.
30: *
31: * @return string
32: */
33: public function objectRevisionClass();
34:
35: /**
36: * @return \Charcoal\Object\ObjectRevisionInterface
37: */
38: public function generateRevision();
39:
40: /**
41: * @return \Charcoal\Object\ObjectRevisionInterface
42: */
43: public function latestRevision();
44:
45: /**
46: * @param integer $revNum The revision number to retrieve.
47: * @return \Charcoal\Object\ObjectRevisionInterface
48: * @see \Charcoal\Object\ObejctRevision::objectRevisionNum
49: */
50: public function revisionNum($revNum);
51:
52: /**
53: * @return array
54: */
55: public function allRevisions();
56:
57: /**
58: * @param integer $revNum The revision number to revert to.
59: * @return boolean Success / Failure.
60: */
61: public function revertToRevision($revNum);
62: }
63: