示例#1
0
文件: belongsto.php 项目: hymns/fuel
 public function __construct($source, $dest, $options = null)
 {
     parent::__construct($source, $dest, $options);
     // Belongs to has different foreign key from has_one/has_many so overwrite default
     // when it wasn't given
     if (empty($options['foreign_key'])) {
         $this->foreign_key = \Inflector::foreign_key($this->dest_class);
     }
 }
示例#2
0
文件: hasone.php 项目: nasumi/fuel
	public function __construct(&$source, $dest, $options = null)
	{
		parent::__construct($source, $dest, $options);
		$this->foreign_key = \Inflector::foreign_key($this->source_class);
	}