[Cartoweb-users] php include

Milo van der Linden mlinden at zeelandnet.nl
Tue Sep 4 04:02:29 EDT 2007


Hello,

I am now extending the auth plugin. I copied the contents of 
..cartoweb3/plugins/auth to ..cartoweb/projects/myProject/plugins/auth

I created a new class in ClientAuth.php: class WsSecurityContainer 
extends SecurityContainer

When I copy all the properties from IniSecurityContainer and change the 
setting in auth.ini to "ws", it works. Just a simple test to see if 
copying the class works.

First I set the constructor to get access to my class that connects to 
the webservice;

public function __construct(ClientPluginConfig $config) {
        require_once('wsSoilution.php');
        //$this->config = $config;   
    }

Now; I changed the checkUser to:

public function checkUser($username, $password) {
        $ws = new wsSoilutionService($username,$password);
        $return = $ws->SignOn();
        if (is_array($return))
        {
        //login success database list
        $databaseList = $return;
       
        }
        else
        {
        //login failed, no list   
        return false;
        }

I want to know where i can put my include file; it is common to my 
project and should be used by several parts of the GUI, I don't want to 
put it one level up for compatibility issues in the future.
Setting the include as CARTOWEB_HOME . "/projects/webGIS/common/' looks 
a bit odd..
Any suggestion?



Oliver Christen schreef:
> Hi
>  
> unless you are talking about a new plugin (for which there are 
> auto-include functions), if you want to include some other kind of php 
> file, simply use the standart php syntax by providing the path to the 
> file.
> you can use CARTOWEB_HOME as a constant to get the path till the 
> cartroweb root point
>  
> regards
> Oliver
>
>     ----- Original Message -----
>     *From:* Milo van der Linden <mailto:mlinden at zeelandnet.nl>
>     *To:* cartoweb-users at lists.maptools.org
>     <mailto:cartoweb-users at lists.maptools.org>
>     *Sent:* Wednesday, August 29, 2007 2:06 PM
>     *Subject:* [Cartoweb-users] php include
>
>     Hello list!
>
>     I have my own class. My common php knowledge tells me that it
>     needs to be included. In a test file I did this with:
>     -  include "filename.php";
>
>     How is this done in Cartoweb?
>
>     I decided that the file I want to use should be in the
>     Cartoweb/Projects/Include directory.
>
>     -- 
>
>
>     	
>
>     Milo van der Linden
>     skype: milovanderlinden <skype:milovanderlinden?add>
>     mlinden at zeelandnet.nl <mailto:mlinden at zeelandnet.nl>
>     milovanderlinden at gmail.com <mailto:milovanderlinden at gmail.com>
>     milo at 3dsite.nl <mailto:milo at 3dsite.nl>
>     http://www.3dsite.nl
>
>     	  	
>
>     De informatie in dit bericht reflecteert mijn persoonlijke mening
>     en niet die van een bedrijf of instantie. Aan de informatie kunnen
>     geen rechten worden ontleend. Indien dit bericht onderdeel is van
>     een forum, mailing-list of community dan gelden automatisch de bij
>     het betreffende medium behorende voorwaarden. The information in
>     this message reflects my personal opinion and not that of a
>     company or public body. All rights reserved.If this message is
>     contained in a mailing-list or community, the rights on the medium
>     are automatically adapted.
>
>     ------------------------------------------------------------------------
>     _______________________________________________
>     Cartoweb-users mailing list
>     Cartoweb-users at lists.maptools.org
>     http://lists.maptools.org/mailman/listinfo/cartoweb-users
>


-- 


	

Milo van der Linden
skype: milovanderlinden <skype:milovanderlinden?add>
mlinden at zeelandnet.nl <mailto:mlinden at zeelandnet.nl>
milovanderlinden at gmail.com <mailto:milovanderlinden at gmail.com>
milo at 3dsite.nl <mailto:milo at 3dsite.nl>
http://www.3dsite.nl

	  	

De informatie in dit bericht reflecteert mijn persoonlijke mening en 
niet die van een bedrijf of instantie. Aan de informatie kunnen geen 
rechten worden ontleend. Indien dit bericht onderdeel is van een forum, 
mailing-list of community dan gelden automatisch de bij het betreffende 
medium behorende voorwaarden. The information in this message reflects 
my personal opinion and not that of a company or public body. All rights 
reserved.If this message is contained in a mailing-list or community, 
the rights on the medium are automatically adapted.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20070904/5e7ced39/attachment.html


More information about the Cartoweb-users mailing list