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); } }
public function __construct(&$source, $dest, $options = null) { parent::__construct($source, $dest, $options); $this->foreign_key = \Inflector::foreign_key($this->source_class); }