예제 #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;
 }