original_string: public static function isOptionsHash($array, $throw = true)
  	{
  		if (Arry::isHash($array))
  		{
  			$keys = array_keys($array);
  			$diff = array_diff($keys,self::$validOptions);
  
  			if (!empty($diff) && $throw) {
  				throw new ActiveRecordException("Unknown key(s): " . join(', ',$diff));
  			}
  
  			$intersect = array_intersect($keys,self::$validOptions);
  
  			if (!empty($intersect)) {
  				return true;
  			}
  		}
  		return false;
  	}
code: public static function isOptionsHash($array, $throw = true)
  	{
  		if (Arry::isHash($array))
  		{
  			$keys = array_keys($array);
  			$diff = array_diff($keys,self::$validOptions);
  
  			if (!empty($diff) && $throw) {
  				throw new ActiveRecordException("Unknown key(s): " . join(', ',$diff));
  			}
  
  			$intersect = array_intersect($keys,self::$validOptions);
  
  			if (!empty($intersect)) {
  				return true;
  			}
  		}
  		return false;
  	}
code_tokens: public static function isOptionsHash ( $ array , $ throw = true ) { if ( Arry :: isHash ( $ array ) ) { $ keys = array_keys ( $ array ) ; $ diff = array_diff ( $ keys , self :: $ validOptions ) ; if ( ! empty ( $ diff ) && $ throw ) { throw new ActiveRecordException ( "Unknown key(s): " . join ( ', ' , $ diff ) ) ; } $ intersect = array_intersect ( $ keys , self :: $ validOptions ) ; if ( ! empty ( $ intersect ) ) { return true ; } } return false ; }
docstring: Determines if the specified array is a valid ActiveRecord options array.
  
  @param array $array An options array
  @param bool $throw True to throw an exception if not valid
  @return boolean True if valid otherwise valse
  @throws {@link ActiveRecordException} if the array contained any invalid options
docstring_tokens: Determines if the specified array is a valid ActiveRecord options array .