Closed (fixed)
Project:
Google Vision API
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
1 Aug 2016 at 06:26 UTC
Updated:
28 Aug 2016 at 14:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ajalan065 commentedHere is the patch with the functions moved to services.
I have also checked the entire module for proper comments and whitespaces and added new lines to the EOF, where they were missing.
Comment #3
naveenvalechaMake the service name to be "google_vision.helper" and keep all the helper functions into it related to all detection types.
Class name to be GoogleVisionHelper Also define the interface as well. GoogleVisionHelperInterface
Comment #4
naveenvalechaUploaded the rerolled patch with suggestions above
Comment #6
naveenvalechaCommitting and pushed to 8.x-1.x
While I was reviewing this I have also filed another issue #2783795: Define the Interface for GoogleVisionApi
Comment #7
eugene.ilyin commentedMhh, why do we need interface GoogleVisionHelperInterface.php? Is it standard?
Comment #8
naveenvalechaYup this is made to keep in mind about the #2739855: Use code from https://github.com/ThijsFeryn/google-cloud-vision-api external library when we'll implement it later(i.e. when php7 will be requirement of the drupal).We will extend the interfaces of that library in our own interface and we'll not break the constructors of our own services(api) as per the d.o. B.C. policy
‘Holy Grail’ of programming is the reuse of existing code – interfaces play an important role in this.
Feel free to reopen if you need any more clarity on it.