fuel/core — Issue #820: import() for app vendor directory
Author: daveganley
Created: 2012-02-07 13:13:23+00:00
State: open

When trying to import vendor libs using import a error occurs. It would be good if this was possible with something like this in the core base.php

if ( ! function_exists('import'))
{
function import($path, $folder = 'classes')
{
$path = str_replace('/', DIRECTORY_SEPARATOR, $path);

if (is_file(COREPATH.$folder.DIRECTORY_SEPARATOR.$path.'.php'))
{
require_once COREPATH.$folder.DIRECTORY_SEPARATOR.$path.'.php';
}
elseif (is_file(APPPATH.$folder.DIRECTORY_SEPARATOR.$path.'.php'))
{
require_once APPPATH.$folder.DIRECTORY_SEPARATOR.$path.'.php';
}
}
}