<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/phuby.php</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,6 @@
 2009-06-19 - Sean Huber (shuber@huberry.com)
   * Fix merge conflicts
+  * Add Phuby class which handles environment logic
 
 2009-06-11 - Sean Huber (shuber@huberry.com)
   * Huge refactor</diff>
      <filename>doc/CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -31,15 +31,6 @@ function set_class_variable($class, $variable, $value) {
     eval($class.'::$'.$variable.' = $value;');
 }
 
-function phuby_autoload($class) {
-    $namespaces = split('::', $class);
-    $file = dirname(__FILE__). DS. '..' . DS . 'lib';
-    foreach ($namespaces as $namespace) {
-        $file .= DS.strtolower(preg_replace('/[^A-Z^a-z^0-9]+/', '_', preg_replace('/([a-z\d])([A-Z])/', '\1_\2', preg_replace('/([A-Z]+)([A-Z][a-z])/', '\1_\2', $namespace))));
-    }
-    require_once $file.'.php';
-}
-
 function build_function_call($function, $arguments = array(), $variable_name = 'arguments') {
     if (!is_array($function)) $function = array($function);
     if (is_object($function[0])) { </diff>
      <filename>lib/functions.php</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,10 @@
 &lt;?php
 
 if (!defined(DS)) define('DS', DIRECTORY_SEPARATOR);
-
-$_ENV['LOAD_PATHS'] = array(dirname(__FILE__).DS.'lib');
+if (!defined(PS)) define('PS', PATH_SEPARATOR);
 
 require_once 'lib'.DS.'functions.php';
+require_once 'lib'.DS.'phuby.php';
 
-spl_autoload_register('phuby_autoload');
\ No newline at end of file
+spl_autoload_register('Phuby::autoload');
+Phuby::append_include_path(dirname(__FILE__.DS.'lib'));
\ No newline at end of file</diff>
      <filename>phuby.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e4be5a2a3aca2b9384631a39da44b539b9fd28ef</id>
    </parent>
  </parents>
  <author>
    <name>Sean Huber</name>
    <email>shuber@huberry.com</email>
  </author>
  <url>http://github.com/shuber/phuby/commit/6e42c9551da1eebe142d7d5e07f06dde90302a9e</url>
  <id>6e42c9551da1eebe142d7d5e07f06dde90302a9e</id>
  <committed-date>2009-06-19T13:48:25-07:00</committed-date>
  <authored-date>2009-06-19T13:48:25-07:00</authored-date>
  <message>Add Phuby class which handles environment logic</message>
  <tree>0cfdde3cae05f165765300a7c6818dea24187245</tree>
  <committer>
    <name>Sean Huber</name>
    <email>shuber@huberry.com</email>
  </committer>
</commit>
