Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: /home/inri/public_html/daCode-HEAD/daCode/src/phplib/resource.exemple.php3
daCode -

Resource

Resource

Class resource. Only for documentation purpose

 

private class Resource

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.11 2002/05/13 21:34:03 jbcombes Exp $

 

Public Method Summary

void

Resource()

Constructor without arguments.
bool

loadResources(array $res_ids)

Preloads some infos about the resources. For optimizatiuon only.
string

viewResource(int $res_id)

Preview the item selected.
string

viewShort(integer $res_id)

Abreviated view of the resource (eg the title)
mixed

checkResource(integer $res_id)

Checks wether the item selected is "commentable"
string

getTopicUrl(integer $res_id, [ integer $absolute, integer $score, mixed $order, integer $theme ])

Returns the URL where the comment can be found

Public Method Details

Resource

public void Resource( )

  Constructor without arguments.

Returns void


loadResources

public bool loadResources( array $res_ids )

  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.

Parameter
array $res_ids
the list of IDs of the resouces to preload
Returns bool

true if SQL succeeded, false otherwise.


viewResource

public string viewResource( int $res_id )

  Preview the item selected.

Parameter
int $res_id
the id of the item
Returns string

the HTML for the item


viewShort

public string viewShort( integer $res_id )

  Abreviated view of the resource (eg the title)

Parameter
integer $res_id
the id of the item
Returns string

the short view, HTML-escaped.


checkResource

public mixed checkResource( integer $res_id )

  Checks wether the item selected is "commentable"

Parameter
integer $res_id
the ID of the item
Returns mixed

a string (an error message) if the item is not to be commented, NULL otherwise.


getTopicUrl

public string getTopicUrl( integer $res_id, [ integer $absolute, integer $score, mixed $order, integer $theme ] )

  Returns the URL where the comment can be found

Parameter
integer $res_id
the ID of resource viewed
integer $absolute = >>1<<
URL is absolute or not.
integer $score = >>-2<<
the threshold for displaying comments
mixed $order = >>""<<
TODO
integer $theme = >>0<<
TODO
Returns string

the URL where to view it.



Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta