Re: PHP5

From: Date: Fri, 26 Mar 2004 02:04:22 +0000
Subject: Re: PHP5
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-26797@lists.php.net to get a copy of this message
Well, that made little to no sense what so ever. "Mina" <usernameking@yahoo.com> wrote in message news:20040325122059.78501.qmail@web40809.mail.yahoo.com... > hello there , > > first congratulation all for the new PHP 5. > so while am testing and playing with it i got some > ideas > and wrote some code for it > > check : http://echoegypt.com/php/php.tar.gz > > <?PHP > require_once("./php/lang/ClassLoader.php"); > /************** > after we require php/lang/ClassLoader.php > there is 1 known static class "ClassLoader" > using internal php __autoload() interceptor function > we can speed up the scripts > and free up our heads from the damn include :) > ***************************/ > > import("php" , true); > /************************** > sure now you can add class into any folder into > import("whatever" , true) folder > for example PHPClass.php must has a class PHPClass > into whatever/some/folders or whatever/php/is/good > and just call $PHP =new PHPClass(); > and the interceptor will call __autoload() which call > ClassLoader which will look into imported dirs and > include the class > import("php" , true); dont require or include any > files into this directory (open the dir and get file > names only) > import("php"); just store directory name and when > class called later it will look there , without open > the dir > import("phpfile.php"); also dont include it just store > the name it > the class name must be the same of the file name Class > - Class.php (Java style) > take look at php/lang/ClassLoader.php > **************************************/ > > $txt = > "pdbc:MySQL://127.0.0.1/database?username=mina&password=askme"; > $WhateverYourDataEngine = > Database::getConnection($txt); > $WhateverYourDataEngine->query("select * from php;"); > /****************************************** > $txt = > "pdbc:pgsql://127.0.0.1/database?username=mina&password=askme"; > etc ... > Java has JDBC why not PHP dont have PDBC :) > whatever php 5 is strong enough to make PDBC in a new > php look and write a drivers for all of database > supported by PHP > so we can write 1 code working with all databases by > just changing the URL > take look at php/sql/Driver.php simple db interface > take look at php/sql/Database.php > take look at php/sql/driver/MySQL.php just a > implementation for the Driver interface > > i was think why not PHP 5 pear going thorw this way > **************************/ > > ?> > > thanks all for reading :) > take care. > > > __________________________________ > Do you Yahoo!? > Yahoo! Finance Tax Center - File online. File on time. > http://taxes.yahoo.com/filing.html

« previous php.pear.dev (#26797) next »