note 55150 added to function.get-declared-classes
| From: | rayro at gmx dot de | Date: | Tue, 26 Jul 2005 16:53:50 +0000 |
| Subject: | note 55150 added to function.get-declared-classes | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-92494@lists.php.net to get a copy of this message | ||
I'm using APACHE's "php_admin_value auto_prepend_file" Command to include a File
at Startup, where I first grab all declared Classes and Save it into an Array...
- apache/conf/httpd.conf
php_admin_value auto_prepend_file //home/file.php
- Content of this Script is:
$declaredClasses = get_declared_classes();
- After that in home/web/index.php File we call it again:
include_once('class1.class.php');
include_once('class2.class.php');
include_once('class3.class.php');
$declaredUserClasses = array_diff(get_declared_classes(), $declaredClasses);
sort($declaredUserClasses);
echo("<pre>"); print_r($declaredUserClasses); // remove later...
- It prints out this Information:
Array
(
[0] => classA
[1] => classB
[2] => classC
)
Hope that can help?
greetz /rayRO
----
Manual Page -- http://www.php.net/manual/en/function.get-declared-classes.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+55150
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55150&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55150&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55150&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55150&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55150&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55150&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+55150&report=yes
Search -- http://master.php.net/manage/user-notes.php