public static function generate()
    {
        $registry = static::create();

        // Look in a cache (if provided) for type details
        if (static::$cache && ($types = static::$cache->get(self::CACHE_KEY))) {
            $registry->elementTypes = $types;
            return $registry;
        }

        // Find all element types
        $classNames = ClassInfo::getValidSubClasses(BaseElement::class);
        foreach ($classNames as $class) {
            // Skip the "abstract" element
            if ($class === BaseElement::class) {
                continue;
            }
            $registry->registerElement($class);
        }

        return $registry;
    }
public static function generate()
    {
        $registry = static::create();

        // Look in a cache (if provided) for type details
        if (static::$cache && ($types = static::$cache->get(self::CACHE_KEY))) {
            $registry->elementTypes = $types;
            return $registry;
        }

        // Find all element types
        $classNames = ClassInfo::getValidSubClasses(BaseElement::class);
        foreach ($classNames as $class) {
            // Skip the "abstract" element
            if ($class === BaseElement::class) {
                continue;
            }
            $registry->registerElement($class);
        }

        return $registry;
    }
public static function generate ( ) { $ registry = static :: create ( ) ; // Look in a cache (if provided) for type details if ( static :: $ cache && ( $ types = static :: $ cache -> get ( self :: CACHE_KEY ) ) ) { $ registry -> elementTypes = $ types ; return $ registry ; } // Find all element types $ classNames = ClassInfo :: getValidSubClasses ( BaseElement :: class ) ; foreach ( $ classNames as $ class ) { // Skip the "abstract" element if ( $ class === BaseElement :: class ) { continue ; } $ registry -> registerElement ( $ class ) ; } return $ registry ; }
Create a registry and attempt to fill it by resolving element types by introspecting class hierarchy

@return static
Create a registry and attempt to fill it by resolving element types by introspecting class hierarchy