Re: conditional classes
| From: | kranthi | Date: | Sun, 24 May 2009 07:10:08 +0000 |
| Subject: | Re: conditional classes | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-293052@lists.php.net to get a copy of this message | ||
thanks for the comments,
what i m planning to do is....
function _autoload($class) {
if($class == 'Database') {
if(class_exis('PDO') {
include_once('Database_PDO.php');
} else {
include_once('Database.php');
}
}
where in Database_PDO.php contains
class Database extends PDO {
}
Database.php contains
class Database {
}