Skip to content

Commit

Permalink
#1: Examples: get_entry.php
Browse files Browse the repository at this point in the history
  • Loading branch information
mekras committed Sep 1, 2016
1 parent 21e9c0a commit 4b68d76
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/examples/get_entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@
}

$entry = $document->getEntry();
printf("Id: %s\nRelease: %s\n", $entry['ID'], $entry['Price']);
foreach ($entry->getProperties() as $property) {
$value = $property->getValue();
if ($value instanceof \DateTimeInterface) {
$value = $value->format(DATE_RFC2822);
}
printf("%s: %s\n", $property->getName(), $value);
}

0 comments on commit 4b68d76

Please sign in to comment.