bnomei/kirby3-boost

View on GitHub
collections/boostidkvs.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

class StaticBoostIdKVs
{
    public static $cache = null;

    public static function load(): ?array
    {
        if (static::$cache) {
            return static::$cache;
        }

        static::$cache = \Bnomei\BoostIndex::singleton()->toKVs();

        return static::$cache;
    }
}

return function () {
    return new \Kirby\Cms\Collection(StaticBoostIdKVs::load());
};