Lazer\Classes\Core_Relation::setKey PHP Method

setKey() protected method

Set key name
protected setKey ( string $type, string $key ) : Core_Relation
$type string local or foreign
$key string key name
return Core_Relation
    protected function setKey($type, $key)
    {
        if (!in_array(null, $this->tables)) {
            Validate::table($this->tables[$type])->field($key);
            $this->keys[$type] = $key;
            return $this;
        }
        throw new LazerException('First you must define tables name');
    }