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');
    }
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');
    }
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' ) ; }
Set key name
@param string $type local or foreign
@param string $key key name
@return self
@throws LazerException First you must define tables name
Set key name