Answer the question
In order to leave comments, you need to log in
Is it clear to use the class to work with the VKontakte API?
I wrote my own class for working with the VKontakte API, I think it would be too much to write about it on Habré, I decided to share it here first.
Class repository https://github.com/esvlad/VkQuery
The class itself is in the Models/VkQuery.php folder
And the question is, is the description of the class operation clear, and how is the class code itself?
Answer the question
In order to leave comments, you need to log in
Sorry, but the code is terrible.
Read about PSR, patterns, DRY/SOLID/KISS.
Basically, I liked it. Man is not bad, understandable. I guess I'll keep it ;-)
Passing parameters to the constructor is missing
1 In your case, you need to constantly change the code in the class itself to replace the config
2 PSR4 is missing, there is no composer. So for sites on the knee of the rules.
3 Alya goodies like upload a lot of photos, post on the wall, it's better to take it separately to another class. for example, you can call HelperVk
4 a lot of extra body movements with if () {
return
}else{}
like this
if( условие ) {
return
}
// тут код else но уже без скобок
return
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question