コード例 #1
0
ファイル: HasMany.php プロジェクト: azhai/CuteLib
 public function bind(Database &$db, $table, $joins = null)
 {
     if (empty($this->foreign_key)) {
         $this->foreign_key = Inflect::singularize($table) . '_id';
     }
     return parent::bind($db, $table, $joins);
 }
コード例 #2
0
ファイル: BelongsTo.php プロジェクト: azhai/CuteLib
 public function __construct($model = '', $another_foreign_key = '')
 {
     parent::__construct($model);
     $this->another_foreign_key = $another_foreign_key;
 }