note 22598 added to function.class-exists
| From: | cristiano at aspatech dot com dot br | Date: | Mon, 24 Jun 2002 15:36:27 +0000 |
| Subject: | note 22598 added to function.class-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-32152@lists.php.net to get a copy of this message | ||
This can be veeeery usefull if you use classes that uses other classes, which can be used in your
front end. In other words, when you lost the control of which classes are declared in which point of
the application, that can generate the "Cannot redeclare class". Use like
if ( !class_exists( YourClass ) ) {
class YourClass {
//your code
}
}
Thats it... Resolve all your problems =)
--
http://www.php.net/manual/en/function.class-exists.php
http://master.php.net/manage/user-notes.php?action=edit+22598
http://master.php.net/manage/user-notes.php?action=delete+22598
http://master.php.net/manage/user-notes.php?action=reject+22598