[Cartoweb-users] Write a plugin

Pierre GIRAUD pierre.giraud at camptocamp.com
Wed May 31 05:42:08 EDT 2006

Your new plugin class implements the GuiProvider interface, doesn't it ?
In this case, you can use 2 public methods :

public function handleHttpPostRequest($request) {
    $variable_to_use = $request['the_variable_sent_by_form'];

public function handleHttpGetRequest($request) {}

Those methods let you access to your posted variables.

Do you need to work on your variables before you use them (apply filters) ?
Do you need to do some jobs before you retrieve request variables 
(initialize your plugin) ?



Jacolin Yves wrote:

>I have some difficulities to write my plugin. Actually, I am a newby in php OO 
>so I am a little bit lost. I would like to use my variable create by adding a 
>form in the edit template (done). I know that these variables are send in the 
>request(they appear in the log request), and I have to do something before to 
>use them in php code. But I don't know how !
>Thanks for your help,
>Yves Jacolin
>Stagaire Conservatoire Régional des Espaces Naturels de la région Centre
>- Qu'est-ce que cela peut faire que je lutte pour la mauvaise cause 
>puisque je suis de bonne foi?
>- Et qu'est-ce que ça peut faire que je sois de mauvaise foi
>puisque c'est pour la bonne cause. (Jacques Prévert)
>Cartoweb-users mailing list
>Cartoweb-users at lists.maptools.org

Géomaticien, Analyste

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex 

Tel : 00 33 4 79 44 44 93
Mail : pierre.giraud at camptocamp.com

More information about the Cartoweb-users mailing list