public static function locate($filename)
    {
        if (@file_exists($filename)) return $filename;

        $_f = CarteBlanche::getPath('carte_blanche_core').$filename;
        if (!empty($_f) && @file_exists($_f)) return $_f;

        $include_paths = explode(PATH_SEPARATOR,get_include_path());
        foreach($include_paths as $_inc) {
            $_f = DirectoryHelper::slashDirname($_inc).$filename;
            if (@file_exists($_f)) return $_f;
        }

        if (class_exists('\CarteBlanche\CarteBlanche')) {
            $bundles = CarteBlanche::getContainer()->get('bundles');
            if (!empty($bundles)) {
                foreach($bundles as $_bundle) {
                    $_f = DirectoryHelper::slashDirname($_bundle->getDirectory()).$filename;
                    if (@file_exists($_f)) return $_f;
                }
            }
        }

        return false;
    }