thangman22 / google-cloud-vision-php

GoogleCloudVision Library for PHP
24 stars 18 forks source link

Update GoogleCloudVision.php #2

Closed klefix closed 8 years ago

klefix commented 8 years ago

Fixed an error where $maxResults would always be 1.

$maxResults = 1 only works in the method head to provide 1 as default value. When calling another function, it actually sets $maxResults to 1 before passing it to the function.

amenk commented 8 years ago

Please merge :-)

samwilson commented 8 years ago

I've merged this into https://github.com/wikisource/google-cloud-vision-php (it's a fork, but I'm very happy to return to using this version when it comes up to date).

joelcuevas commented 8 years ago

Workaround: use addFeature method. The second parameter is $maxResults.

$gcv->addFeature("TEXT_DETECTION", 10);
$gcv->addFeature("LABEL_DETECTION", 10);
...