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