/**
  * Returns an instance of the SilkObjectRelationalManager singleton.  Most 
  * people can generally use orm() instead of this, but they 
  * both do the same thing.
  *
  * @return SilkObjectRelationalManager The singleton SilkObjectRelationalManager instance
  * @author Ted Kulp
  **/
 public static function get_instance()
 {
     if (self::$instance == NULL) {
         self::$instance = new SilkObjectRelationalManager();
     }
     return self::$instance;
 }
Пример #2
0
function orm($class = '')
{
    if ($class == '') {
        return SilkObjectRelationalManager::get_instance();
    } else {
        return SilkObjectRelationalManager::get_instance()->{$class};
    }
}