Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CURL.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

namespace SimpleGeo;

class CURL{

Expand Down
6 changes: 4 additions & 2 deletions OAuth.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?php
namespace SimpleGeo;

// vim: foldmethod=marker

/* Generic exception class
*/
class OAuthException extends Exception {
class OAuthException extends \Exception {
// pass
}

Expand Down Expand Up @@ -720,7 +722,7 @@ function new_access_token($token, $consumer, $verifier = null) {
class OAuthUtil {
public static function urlencode_rfc3986($input) {
if (is_array($input)) {
return array_map(array('OAuthUtil', 'urlencode_rfc3986'), $input);
return array_map(array('\SimpleGeo\OAuthUtil', 'urlencode_rfc3986'), $input);
} else if (is_scalar($input)) {
return str_replace(
'+',
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ There are a couple of different ways to retrieve nearby records - either by IP,
'end' => time()
));

## hCard adr queries

It is possible to format the result of a Context query to expose properties you would expect from
an hCard. Primarily this includes countryName, region and locality. The normalization of individual
countries' naming conventions for their regions is handled by this class.

$adr = \SimpleGeo\adr::createFromLatLng($geo, 49.239, -123.129);
echo $adr->locality; // Vancouver
echo $adr->region; // British Columbia
echo $adr->country; // Canada

## Everything else

Expand Down
Loading