protected function isVersionedKey($key, array $versionedKeys)
    {
        $segments = explode(".",$key);

        if (count($segments) > 2) {
            throw new Exception("Key '".$key."' has too many fractions.");
        }

        if (count($segments) == 1 && in_array($segments[0], $versionedKeys)) {
            return $segments[0];
        }

        if (count($segments) == 2 && $segments[0] == $this->model->getVersionTable() && in_array($segments[1], $versionedKeys)) {
            return $segments[1];
        }

        return null;
    }
protected function isVersionedKey($key, array $versionedKeys)
    {
        $segments = explode(".",$key);

        if (count($segments) > 2) {
            throw new Exception("Key '".$key."' has too many fractions.");
        }

        if (count($segments) == 1 && in_array($segments[0], $versionedKeys)) {
            return $segments[0];
        }

        if (count($segments) == 2 && $segments[0] == $this->model->getVersionTable() && in_array($segments[1], $versionedKeys)) {
            return $segments[1];
        }

        return null;
    }
protected function isVersionedKey ( $ key , array $ versionedKeys ) { $ segments = explode ( "." , $ key ) ; if ( count ( $ segments ) > 2 ) { throw new Exception ( "Key '" . $ key . "' has too many fractions." ) ; } if ( count ( $ segments ) == 1 && in_array ( $ segments [ 0 ] , $ versionedKeys ) ) { return $ segments [ 0 ] ; } if ( count ( $ segments ) == 2 && $ segments [ 0 ] == $ this -> model -> getVersionTable ( ) && in_array ( $ segments [ 1 ] , $ versionedKeys ) ) { return $ segments [ 1 ] ; } return null ; }
Check if key is in versioned keys.

@param  string  $key
@param  array  $versionedKeys
@return string|null
Check if key is in versioned keys .