Logo Search packages:      
Sourcecode: dacode version File versions  Download package

resource.exemple.php3

<?php
/**
 * Class resource. Only for documentation purpose
 *
 * It describes the interface to be implemented to allow commenting on the resource.
 * All the methods here are public
 *
 * +---------------------------------------------------+
 * | This class is only for documentation purposes. It |
 * | shall not be used or extented in any way.         |
 * +---------------------------------------------------+
 *
 * daCode http://www.dacode.org/
 * src/phplib/resource.exemple.php3
 * $Id: resource.exemple.php3,v 1.5.2.7 2002/05/30 20:41:24 pterjan Exp $
 */
Class Resource {


      /**
       * Constructor without arguments.
       */
      Function Resource () {
      }

      /**
       * Preloads some infos about the resources. For optimizatiuon only.
       * FIXME: maybe other stuff neede here...
       * Implementation details: shall cache as much info as needed.
       * Everything needed to produced a 'short view' shall be cached,
       * plus ids, timpstamps & that kind of stuff.
       *@param array $res_ids the list of IDs of the resouces to preload
       *@return bool true if SQL succeeded, false otherwise.
       *@access public
       */
      Function loadResources($res_ids) {
      }

      /**
       * Preview the item selected.
       *@param int $res_id the id of the item
       *@return string the HTML for the item
       *@access public
       */
      Function viewResource($res_id) {
      }

      /**
       * Abreviated view of the resource (eg the title)
       *@param integer $res_id the id of the item
       *@return string the short view, HTML-escaped.
       *@access public
       */
      Function viewShort($res_id) {
      }

      /**
       * Checks wether the item selected is "commentable"
       *@param integer $res_id the ID of the item
       *@return mixed a string (an error message) if the item is not to be commented, NULL otherwise.
       *@access public
       */
      Function checkResource ($res_id) {
      }

      /**
       * Returns the URL where the comment can be found
       *@param integer $res_id the ID of resource viewed
       *@param integer $absolute URL is absolute or not.
       *@param integer $score the threshold for displaying comments
       *@param mixed $order TODO
       *@param integer $theme TODO
       *@return string the URL where to view it.
       *@access public
       */
      Function getTopicUrl($res_id, $absolute = 1, $score=-2, $order="", $theme=0) {
      }

}

?>

Generated by  Doxygen 1.6.0   Back to index