Skip to content

Commit

Permalink
Updating example autoloader for reorg'd repo, adding 'complete' message
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Parmley authored and Zachary Parmley committed Aug 2, 2012
1 parent 4a0caf7 commit 90d0fe2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions example.php
Expand Up @@ -22,16 +22,16 @@
MOTD;

spl_autoload_register(function($class) {
require(implode('/', array_slice(explode('\\', $class), 1)) . '.php');
require(implode('/', explode('\\', $class)) . '.php');
});

try {
echo "\nSearching petfinder for dogs...";
$requestType = 'shelter.getPets';
$requestArgs = array(
'id' => 'SHELTER ID',
'id' => 'SHELTER ID',
'status' => 'A',
'count' => 10,
'count' => 10,
'format' => 'json');
$key = 'API KEY';
$secret = 'API SECRET';
Expand Down Expand Up @@ -59,4 +59,6 @@
. "time...\n\nError message:\n\t"
. $ex->getMessage()
. "\n";
}
}

echo "\nScript complete\n";

0 comments on commit 90d0fe2

Please sign in to comment.