Permalink
Browse files

Updating example autoloader for reorg'd repo, adding 'complete' message

  • Loading branch information...
1 parent 4a0caf7 commit 90d0fe256b123a0aa9e7259d66f9b511da9c3312 Zachary Parmley committed Aug 2, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 example.php
View
@@ -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';
@@ -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.