[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/ -> interfaces.php (sommaire)

Core interfaces essential for TApplication class.

Author: Qiang Xue <qiang.xue@gmail.com>
Copyright: Copyright © 2005 PradoSoft
License: http://www.pradosoft.com/license/
Version: $Id: interfaces.php 1397 2006-09-07 07:55:53Z wei $
Poids: 283 lignes (7 kb)
Inclus ou requis: 1 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 9 classes

IModule:: (3 méthodes):
  init()
  getID()
  setID()

IService:: (4 méthodes):
  init()
  getID()
  setID()
  run()

ITextWriter:: (2 méthodes):
  write()
  flush()

IUser:: (9 méthodes):
  getName()
  setName()
  getIsGuest()
  setIsGuest()
  getRoles()
  setRoles()
  isInRole()
  saveToString()
  loadFromString()

IStatePersister:: (2 méthodes):
  load()
  save()

ICache:: (5 méthodes):
  get()
  set()
  add()
  delete()
  flush()

ICacheDependency:: (1 méthode):
  getHasChanged()

IRenderable:: (1 méthode):
  render()

IBindable:: (1 méthode):
  dataBind()


Interface: IModule  - X-Ref

IModule interface.

This interface must be implemented by application modules.

init($config)   X-Ref
Initializes the module.

param: TXmlElement the configuration for the module

getID()   X-Ref

return: string ID of the module

setID($id)   X-Ref

param: string ID of the module

Interface: IService  - X-Ref

IService interface.

This interface must be implemented by services.

init($config)   X-Ref
Initializes the service.

param: TXmlElement the configuration for the service

getID()   X-Ref

return: string ID of the service

setID($id)   X-Ref

param: string ID of the service

run()   X-Ref
Runs the service.


Interface: ITextWriter  - X-Ref

ITextWriter interface.

This interface must be implemented by writers.

write($str)   X-Ref
Writes a string.

param: string string to be written

flush()   X-Ref
Flushes the content that has been written.


Interface: IUser  - X-Ref

IUser interface.

This interface must be implemented by user objects.

getName()   X-Ref

return: string username

setName($value)   X-Ref

param: string username

getIsGuest()   X-Ref

return: boolean if the user is a guest

setIsGuest($value)   X-Ref

param: boolean if the user is a guest

getRoles()   X-Ref

return: array list of roles that the user is of

setRoles($value)   X-Ref

return: array|string list of roles that the user is of. If it is a string, roles are assumed by separated by comma

isInRole($role)   X-Ref

param: string role to be tested
return: boolean whether the user is of this role

saveToString()   X-Ref

return: string user data that is serialized and will be stored in session

loadFromString($string)   X-Ref

param: string user data that is serialized and restored from session
return: IUser the user object

Interface: IStatePersister  - X-Ref

IStatePersister class.

This interface must be implemented by all state persister classes (such as
{@link TPageStatePersister}, {@link TApplicationStatePersister}.

load()   X-Ref
Loads state from a persistent storage.

return: mixed the state

save($state)   X-Ref
Saves state into a persistent storage.

param: mixed the state to be saved

Interface: ICache  - X-Ref

ICache interface.

This interface must be implemented by cache managers.

get($id)   X-Ref
Retrieves a value from cache with a specified key.

param: string a key identifying the cached value
return: mixed the value stored in cache, false if the value is not in the cache or expired.

set($id,$value,$expire=0,$dependency=null)   X-Ref
Stores a value identified by a key into cache.
If the cache already contains such a key, the existing value and
expiration time will be replaced with the new ones.

param: string the key identifying the value to be cached
param: mixed the value to be cached
param: integer the number of seconds in which the cached value will expire. 0 means never expire.
param: ICacheDependency dependency of the cached item. If the dependency changes, the item is labelled invalid.
return: boolean true if the value is successfully stored into cache, false otherwise

add($id,$value,$expire=0,$dependency=null)   X-Ref
Stores a value identified by a key into cache if the cache does not contain this key.
Nothing will be done if the cache already contains the key.

param: string the key identifying the value to be cached
param: mixed the value to be cached
param: integer the number of seconds in which the cached value will expire. 0 means never expire.
param: ICacheDependency dependency of the cached item. If the dependency changes, the item is labelled invalid.
return: boolean true if the value is successfully stored into cache, false otherwise

delete($id)   X-Ref
Deletes a value with the specified key from cache

param: string the key of the value to be deleted
return: boolean if no error happens during deletion

flush()   X-Ref
Deletes all values from cache.
Be careful of performing this operation if the cache is shared by multiple applications.


Interface: ICacheDependency  - X-Ref

ICacheDependency interface.

This interface must be implemented by classes meant to be used as
cache dependencies.

getHasChanged()   X-Ref

return: boolean whether the dependency has changed. Defaults to false.

Interface: IRenderable  - X-Ref

IRenderable interface.

This interface must be implemented by classes that can be rendered
to end-users.

render($writer)   X-Ref
Renders the component to end-users.

param: ITextWriter writer for the rendering purpose

Interface: IBindable  - X-Ref

IBindable interface.

This interface must be implemented by classes that are capable of performing databinding.

dataBind()   X-Ref
Performs databinding.




Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7