svn: /phd/trunk/ phpdotnet/phd/Config.php render.php
| From: | Paul Jones | Date: | Fri, 30 Apr 2010 16:33:29 +0000 |
| Subject: | svn: /phd/trunk/ phpdotnet/phd/Config.php render.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-6539@lists.php.net to get a copy of this message | ||
pmjones Fri, 30 Apr 2010 16:33:29 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=298813
Log:
Config::init() now adds the include_path to the package_dirs so that custom packages are recognized.
Changed paths:
U phd/trunk/phpdotnet/phd/Config.php
U phd/trunk/render.php
Modified: phd/trunk/phpdotnet/phd/Config.php
===================================================================
--- phd/trunk/phpdotnet/phd/Config.php 2010-04-30 16:30:49 UTC (rev 298812)
+++ phd/trunk/phpdotnet/phd/Config.php 2010-04-30 16:33:29 UTC (rev 298813)
@@ -51,7 +51,19 @@
);
public static function init(array $a) {
+ // add the include-path to the package dirs
+ $include_path = explode(PATH_SEPARATOR, get_include_path());
+ foreach ($include_path as $dir) {
+ if ($dir != __INSTALLDIR__) {
+ self::$optionArray['package_dirs'][] = $dir;
+ }
+ }
+
+ // now merge other options
self::$optionArray = array_merge(self::$optionArray, (array)$a);
+
+ var_dump(self::$optionArray['package_dirs']);
+ die();
}
public static function getAllFiltered() {
Modified: phd/trunk/render.php
===================================================================
--- phd/trunk/render.php 2010-04-30 16:30:49 UTC (rev 298812)
+++ phd/trunk/render.php 2010-04-30 16:33:29 UTC (rev 298813)
@@ -19,6 +19,9 @@
v("Loading config from existing file", VERBOSE_MESSAGES);
$conf = include "phd.config.php";
Config::init($conf);
+} else {
+ // need to init regardless so we get package-dirs from the include-path
+ Config::init(array());
}
BuildOptionsParser::getopt();