note 55150 rejected from function.get-declared-classes by vincent
| From: | vincent@php.net | Date: | Tue, 26 Jul 2005 16:59:29 +0000 |
| Subject: | note 55150 rejected from function.get-declared-classes by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-92497@lists.php.net to get a copy of this message | ||
Note Submitter: rayro at gmx dot de
----
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