diff --git a/ActiveRecord.php b/ActiveRecord.php index 084587547..5965d09e0 100644 --- a/ActiveRecord.php +++ b/ActiveRecord.php @@ -1,50 +1,50 @@ -get_model_directory(); - $root = realpath(isset($path) ? $path : '.'); - - if (($namespaces = ActiveRecord\get_namespaces($class_name))) - { - $class_name = array_pop($namespaces); - $directories = array(); - - foreach ($namespaces as $directory) - $directories[] = $directory; - - $root .= DIRECTORY_SEPARATOR . implode($directories, DIRECTORY_SEPARATOR); - } - - $file = "$root/$class_name.php"; - - if (file_exists($file)) - require_once $file; -} \ No newline at end of file +get_model_directory(); + $root = realpath(isset($path) ? $path : '.'); + + if (($namespaces = ActiveRecord\get_namespaces($class_name))) + { + $class_name = array_pop($namespaces); + $directories = array(); + + foreach ($namespaces as $directory) + $directories[] = $directory; + + $root .= DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $directories); + } + + $file = "$root/$class_name.php"; + + if (file_exists($file)) + require_once $file; +}