public function hasRelatedKey($key, $model = false)
    {
        if (!$model) {
            $model = $this->model;
        }

        if (($methodBreaker = strpos($key, '.')) !== false) {
            $method = substr($key, 0, $methodBreaker);
            if (method_exists($model, $method)) {
                return true;
            }
        }

        return false;
    }
public function hasRelatedKey($key, $model = false)
    {
        if (!$model) {
            $model = $this->model;
        }

        if (($methodBreaker = strpos($key, '.')) !== false) {
            $method = substr($key, 0, $methodBreaker);
            if (method_exists($model, $method)) {
                return true;
            }
        }

        return false;
    }
public function hasRelatedKey ( $ key , $ model = false ) { if ( ! $ model ) { $ model = $ this -> model ; } if ( ( $ methodBreaker = strpos ( $ key , '.' ) ) !== false ) { $ method = substr ( $ key , 0 , $ methodBreaker ) ; if ( method_exists ( $ model , $ method ) ) { return true ; } } return false ; }
Determines if a key resolved a related Model.

@param string $key
@param mixed  $model

@return bool
Determines if a key resolved a related Model .