Location: PHPKode > scripts > sqltoolkit > sqltoolkit/datasource.php
<?php
/*

    datasource.php - A PHP class for defining database configurations.
    Copyright (C) 2003 Erik Giberti (AF-Design), All rights reserved.

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*/

if (!defined("_DATASOURCE_CLASS_")){
	define("_DATASOURCE_CLASS_", TRUE);

	class datasource {
		var $type;
		var $server;
		var $port;
		var $username;
		var $password;
		var $database;
	
		function datasource($type, $server, $port, $username, $password, $database){
			$this->type     = $type;
			$this->server   = $server;
			$this->port     = $port;
			$this->username = $username;
			$this->password = $password;
			$this->database = $database;
		}
		
		/* methods */
		function get_type(){
			return $this->type;
		}
		function get_server(){
			return $this->server;
		}
		function get_port(){
			return $this->port;
		}
		function get_username(){
			return $this->username;
		}
		function get_password(){
			return $this->password;
		}
		function get_database(){
			return $this->database;
		}
	} // end class datasource

} // end code lock _DATASOURCE_CLASS_ definition

?>
Return current item: sqltoolkit