コード例 #1
0
ファイル: BaseStore.php プロジェクト: eleparquier/nj_common
 /**
  * @param int $id Id de l'objet à renvoyer
  * @return Bean
  */
 public static function getById($id)
 {
     if (self::exists($id)) {
         return self::$stock[static::$table][$id];
     } else {
         $business = 'fr\\gilman\\nj\\common\\bb\\business\\' . BaseBusiness::underscoreToCamelCase(static::$table) . 'Business';
         self::$stock[static::$table][$id] = $business::getById($id);
     }
     return self::$stock[static::$table][$id];
 }
コード例 #2
0
 /**
  * Renvoie le Infrastructure demandé
  * @var int $id Id primaire du Infrastructure
  * @return Infrastructure
  */
 public static function getById($id)
 {
     return parent::getById($id);
 }