src/PeskyCMF/Providers/PeskyCmfServiceProvider.php
protected function registerClassNameSingleton($singletonName, $className = null) {
        if (empty($className)) {
            $className = $singletonName;
        }
        $this->app->singleton($singletonName, function () use ($className) {
            // note: do not create record here or you will possibly encounter infinite loop because this class may be
            // used in TableStructure via app(NameTableStructure) (for example to get default value, etc)
            return $className;
        });
    }
protected function registerClassNameSingleton($singletonName, $className = null) {
        if (empty($className)) {
            $className = $singletonName;
        }
        $this->app->singleton($singletonName, function () use ($className) {
            // note: do not create record here or you will possibly encounter infinite loop because this class may be
            // used in TableStructure via app(NameTableStructure) (for example to get default value, etc)
            return $className;
        });
    }
Used to register DB Record class names (Records are not singletons but class name is a singleton)
@param string $singletonName - singleton name in app's service container (should be a class name)
@param null|string $className - maps singleton to this class. When null - $singletonName is used as $className.
Singleton will return a class name, not an instance of class