Generator::exists PHP Method

exists() public static method

public static exists ( $type )
    public static function exists($type)
    {
        $type = Inflector::underscore($type);
        $class = Inflector::camelize($type) . 'Generator';
        $path = 'lib/generators/' . $type;
        $file = $path . '/' . $class . '.php';
        if (Filesystem::exists($file)) {
            require_once $file;
            return $class;
        }
        return false;
    }