[ Index ]
 

Code source de Plume CMS 1.2.2

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/manager/inc/ -> class.resourceset.php (sommaire)

(pas de description)

Poids: 288 lignes (8 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 2 classes

ResourceSet:: (12 méthodes):
  ResourceSet()
  autoSave()
  recoverFields()
  f()
  extf()
  getPath()
  loadCurrent()
  moveNext()
  getTextContent()
  move()
  extMoveNext()
  extEOF()

MemStorage:: (2 méthodes):
  get()
  save()


Classe: ResourceSet  - X-Ref

resourceset extends recordset to store dynamically a set of
resources. These resources can be news, articles, etc...
The goal is to provide a convinient way to iterate through
different type of resources.
An instance of recordset is created from a query against the
`resources` table joined to the `categories` to be able to
have the current category information.

ResourceSet($data='')   X-Ref
Init the resourceset from an array.
If not empty, load the current resource object.


autoSave($fields)   X-Ref
Auto save for load some fields.

When loading a resource from the data in the current list
the list special data is not used in the object. For example
if the list of resources is coming from a search, the score
is lost. The auto save feature is used to recover such fields.

param: array Fields to save
return: bool True

recoverFields()   X-Ref
Recover the fields set by autoSave().

return: bool True

f($field)   X-Ref
Access to data in the current resource.

param: string Field to retrieve
return: mixed Field data

extf($ext, $field)   X-Ref
Access to extended data in the current resource.

param: string Extended resource
param: string Field to retrieve
return: mixed Field data

getPath($type='')   X-Ref
Get the path of the resource.

return: string Path

loadCurrent()   X-Ref
From the data at the current index, load the
corresponding resource object into $this->cur


moveNext()   X-Ref
Move to the next resource.

return: bool false if no next resource

getTextContent($field)   X-Ref
Get content of a field as text.
& is encoded as &

param: string Field to get
return: string Content

move($index)   X-Ref
Move to a given index.

param: int Index to move to
return: bool false if no index

extMoveNext($ext)   X-Ref
Iterate through extended data.

param: string Extended data
return: bool The move was a success or not

extEOF($ext)   X-Ref
Check the end of extended data.

param: string Extended data
return: bool At the end of the data

Classe: MemStorage  - X-Ref

Global storage of resources. Used by the ResourceSet to avoid reloading
many times a resource within a page.

get($res_id)   X-Ref
Returns a resource or false if not available

param: int Resource id
return: mixed Resource object or false

save($res)   X-Ref
Save the resource.

param: Object Resource object
return: true



Généré le : Mon Nov 26 11:57:01 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics