project.php - reporting fails on items with dashes.
Opened this issue · 2 comments
jamus commented
It seems that properties that have dashes (-) aren't being output.
E.g. client-id
$result = $api->getProjects( );
if( $result->isSuccess() ) {
foreach( $result->data as $project ) {
echo $project->name; // OK
echo $project->id; // OK
echo $project->client-id; // does not output
}
mattvick commented
Hi jamus,
You can do this like this:
$project->{'client-id'};
Have you seen Guzzle? It's perhaps a better option than HaPi :)
Matthew
jamus commented
I am sooooo sorry I've only just seen your response. Thank you!
I will check out Guzzle too.