src/noorm/Persistent.php
public static function One($id) {
    $class = get_called_class();
    
    if (! isset(self::$refs[$class][$id])) {
      $file = self::File($id);
      $obj = unserialize(file_get_contents($file));
      self::$refs[$class][$id] = $obj;
    }
    
    return self::$refs[$class][$id];
  }
public static function One($id) {
    $class = get_called_class();
    
    if (! isset(self::$refs[$class][$id])) {
      $file = self::File($id);
      $obj = unserialize(file_get_contents($file));
      self::$refs[$class][$id] = $obj;
    }
    
    return self::$refs[$class][$id];
  }
public static function One ( $ id ) { $ class = get_called_class ( ) ; if ( ! isset ( self :: $ refs [ $ class ] [ $ id ] ) ) { $ file = self :: File ( $ id ) ; $ obj = unserialize ( file_get_contents ( $ file ) ) ; self :: $ refs [ $ class ] [ $ id ] = $ obj ; } return self :: $ refs [ $ class ] [ $ id ] ; }
Fetch one saved object by id
@param int $id
@return Persistent
Fetch one saved object by id