dmBridge PHP API
DMDataStore.php
00001 <?php
00002 #
00003 # dmBridge: a data access framework for CONTENTdm(R)
00004 #
00005 # Copyright © 2009, 2010, 2011 Board of Regents of the Nevada System of Higher
00006 # Education, on behalf of the University of Nevada, Las Vegas
00007 #
00008 
00013 interface DMDataStore {
00014 
00018    function beginTransaction();
00019 
00023    function commit();
00024 
00029    function createTables();
00030 
00034    function getType();
00035 
00042    function read($sql, array $params);
00043 
00047    function rollBack();
00048 
00055    function write($sql, array $params);
00056 
00063    function getCommentsForQuery(DMCommentQuery $query, $count);
00064 
00071    function getTagsForQueryAsCounts(DMTagQuery $query, $count);
00072 
00079    function getTagsForQueryAsObjects(DMTagQuery $query, $count);
00080 
00084    function deleteComment(DMComment $comment);
00085 
00091    function loadComment($id);
00092 
00099    function saveComment(DMComment $c);
00100 
00106    function getMeanNumCommentsPerObjectInCollection(DMCollection $col);
00107 
00113    function getMedianNumCommentsPerObjectInCollection(DMCollection $col);
00114 
00120    function getMeanNumRatingsPerObjectInCollection(DMCollection $col);
00121 
00127    function getMedianNumRatingsPerObjectInCollection(DMCollection $col);
00128 
00134    function getMeanNumTagsPerObjectInCollection(DMCollection $col);
00135 
00141    function getMedianNumTagsPerObjectInCollection(DMCollection $col);
00142 
00147    function getNumObjectsWithApprovedComments();
00148 
00157    function addObjectComment(DMObject $obj, DMComment $comment);
00158 
00165    function getObjectsWithMostComments($limit);
00166 
00173    function getAllRatingsForObject(DMObject $o);
00174 
00179    function getNumObjectsWithRatings();
00180 
00185    function getNumRatings();
00186 
00192    function getNumRatingsInCollection(DMCollection $c);
00193 
00199    function getNumRatingsForObject(DMObject $o);
00200 
00208    function addObjectRating(DMObject $o, DMRating $r);
00209 
00215    function getObjectsWithHighestRatings($limit);
00216 
00222    function getObjectsWithLowestRatings($limit);
00223 
00229    function getObjectsWithMostRatings($limit);
00230 
00236    function getRatingForObject(DMObject $o);
00237 
00245    function deleteAllTagsWithValue($value);
00246 
00252    function deleteTag(DMTag $tag);
00253 
00259    function loadTag($id);
00260 
00267    function saveTag(DMTag $tag);
00268 
00273    function getNumObjectsWithApprovedTags();
00274 
00283    function addObjectTag(DMObject $o, DMTag $t);
00284 
00291    function getObjectsWithMostTags($limit);
00292 
00293 }
 All Data Structures Functions Variables