code: 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;
          });
      }
docs: 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