public static function locate($filename, $type = null)
    {
        $locator = self::getContainer()->get('locator');
        switch ($type) {
            case 'data':
                return $locator->locateData($filename);
                break;
            case 'config':
                return $locator->locateConfig($filename, true);
                break;
            case 'language': case 'i18n':
                return $locator->locateLanguage($filename, true);
                break;
            case 'view':
                return $locator->locateView($filename, true);
                break;
            case 'controller':
                return $locator->locateController($filename);
                break;
            default:
                return $locator->locate($filename);
                break;
        }
    }